├── Assets ├── MeshSparklyEffect │ ├── Editor.meta │ ├── Runtime │ │ ├── Resources.meta │ │ ├── Scripts │ │ │ ├── MeshToMap.cs.meta │ │ │ ├── SparkleVFX.cs.meta │ │ │ ├── SkinnedMeshSparklyEffect.cs.meta │ │ │ ├── MeshSparklyEffect.cs.meta │ │ │ ├── MeshSparklyEffect.cs │ │ │ ├── MeshToMap.cs │ │ │ ├── SkinnedMeshSparklyEffect.cs │ │ │ └── SparkleVFX.cs │ │ ├── Resources │ │ │ ├── Sparkle.vfx.meta │ │ │ ├── BakeToRenderTexture.compute.meta │ │ │ └── BakeToRenderTexture.compute │ │ ├── Scripts.meta │ │ ├── VFXGraph.meta │ │ ├── Unity.com.kuyuri.meshsparklyeffect.asmdef.meta │ │ ├── VFXGraph │ │ │ ├── Bar.shadersubgraph.meta │ │ │ ├── SparkleShader.shadergraph.meta │ │ │ └── ProceduralSparkle.shadersubgraph.meta │ │ └── Unity.com.kuyuri.meshsparklyeffect.asmdef │ ├── Editor │ │ ├── MinMaxSliderWithValue.cs.meta │ │ ├── Resources.meta │ │ ├── Unity.com.kuyuri.meshsparklyeffect.Editor.asmdef.meta │ │ ├── Resources │ │ │ ├── MeshSparklyEffectInspector.uxml.meta │ │ │ ├── SkinnedMeshSparklyEffectInspector.uxml.meta │ │ │ ├── SkinnedMeshSparklyEffectInspector.uxml │ │ │ └── MeshSparklyEffectInspector.uxml │ │ ├── MeshSparklyEffectInspector.cs.meta │ │ ├── SkinnedMeshSparklyEffectInspector.cs.meta │ │ ├── Unity.com.kuyuri.meshsparklyeffect.Editor.asmdef │ │ ├── SkinnedMeshSparklyEffectInspector.cs │ │ ├── MinMaxSliderWithValue.cs │ │ └── MeshSparklyEffectInspector.cs │ ├── Documentation │ │ ├── Images │ │ │ ├── inspector.png │ │ │ ├── vertex_map.png │ │ │ ├── pymon_demo.gif │ │ │ ├── inspector.png.meta │ │ │ ├── pymon_demo.gif.meta │ │ │ └── vertex_map.png.meta │ │ ├── MeshSparklyEffect.md.meta │ │ ├── MeshSparklyEffect_ja.md.meta │ │ ├── Images.meta │ │ ├── MeshSparklyEffect_ja.md │ │ └── MeshSparklyEffect.md │ ├── CHANGELOG.md.meta │ ├── README.md.meta │ ├── README_ja.md.meta │ ├── Samples │ │ ├── MeshFilterSample │ │ │ ├── MeshFilterSample │ │ │ │ ├── uv-checker.png │ │ │ │ ├── Global Volume Profile.asset.meta │ │ │ │ ├── BoxPhysicMaterial.physicMaterial.meta │ │ │ │ ├── BoxPhysicMaterial.physicMaterial │ │ │ │ ├── Global Volume Profile.asset │ │ │ │ └── uv-checker.png.meta │ │ │ ├── MeshFilterSample.unity.meta │ │ │ ├── Materials.meta │ │ │ ├── MeshFilterSample.meta │ │ │ └── Materials │ │ │ │ ├── uv-checker.mat.meta │ │ │ │ └── uv-checker.mat │ │ └── MeshFilterSample.meta │ ├── package.json.meta │ ├── Runtime.meta │ ├── Samples.meta │ ├── Documentation.meta │ ├── CHANGELOG.md │ ├── package.json │ ├── README_ja.md │ └── README.md ├── Scenes.meta ├── MeshSparklyEffect.meta ├── RenderingAssets.meta └── RenderingAssets │ ├── UniversalRenderPipelineAsset.asset.meta │ ├── UniversalRenderPipelineAsset_Renderer.asset.meta │ ├── UniversalRenderPipelineAsset_Renderer.asset │ └── UniversalRenderPipelineAsset.asset ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── URPProjectSettings.asset ├── AudioManager.asset ├── TagManager.asset ├── VFXManager.asset ├── UnityConnectSettings.asset ├── EditorSettings.asset ├── PackageManagerSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── LICENSE ├── .gitignore ├── UIElementsSchema ├── UIElements.xsd ├── UnityEditor.UIElements.Debugger.xsd ├── UIToolkitExtensions.xsd ├── GlobalNamespace.xsd ├── UnityEditor.ShaderGraph.Drawing.xsd ├── UnityEditor.Rendering.LookDev.xsd ├── UnityEditor.VFX.UI.xsd ├── Unity.Cloud.Collaborate.Views.xsd └── Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd ├── README_ja.md ├── .gitattributes ├── UserSettings └── EditorUserSettings.asset ├── Packages ├── manifest.json └── packages-lock.json └── README.md /Assets/MeshSparklyEffect/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3eb58cc26be04c6f9d6b68f8349c35d6 3 | timeCreated: 1622556553 -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.9f1 2 | m_EditorVersionWithRevision: 2020.3.9f1 (108be757e447) 3 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35452c5097e34106acf92e36cb0ade01 3 | timeCreated: 1622556621 -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/MinMaxSliderWithValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fdcf0db3abc487dab38b706f7bbec32 3 | timeCreated: 1622766024 -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/MeshToMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b8255adafab41b49cebf9ecc36a9598 3 | timeCreated: 1623828908 -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/SparkleVFX.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b47e2909f99f40a89e641fbe52aaf8a7 3 | timeCreated: 1623827382 -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/SkinnedMeshSparklyEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 087cee6874bd402e8a5ac577adfbc545 3 | timeCreated: 1623831455 -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/inspector.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4dc3e1b2d06f9869cfb0fec122cb2e9b45958ad1c57d99b8cca543fb84bf62af 3 | size 45290 4 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/vertex_map.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:97055e777e9de165a116ae589a0eeb0a0459558edd0e42d5d0d1e0053a1b8fd8 3 | size 10948 4 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/pymon_demo.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:507b02ff35a886683217a008634a4a76dd9e0d4b46a3a0be3bb0a5f755d43494 3 | size 7603558 4 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c1aad67eeed51b4ba4d0a71eea6b6c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a22b730ad1a4ce4e809608784660251 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dab2028b6d48d644e85dc1b79a894bca 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/README_ja.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 186025b22fa0e2a4589f0ce451ed2fec 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/uv-checker.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8b2ccbbec9200bd5a9918ba195b7c45d46b86ba2daaa4448e1e5ea35784b44ba 3 | size 4202201 4 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7752a971f5bdfea489f6b820b3bf7696 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c8a39454c1c51545b0b9981464b67fc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/RenderingAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8aa7196fa5df9844bb3243d8661d8c49 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9422588ba514e2cb3122fe8975cb41c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a135ab614e9924a4ab7d2b5b021e5546 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40b53a6b5261efd428bd62433a49331a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Resources/Sparkle.vfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0eee333c1bfbdd4faa69633ca40b405 3 | VisualEffectImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: addede4fadecbf14a94db7dd55907add 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect_ja.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eef81449f4ffc7944bc8638cf09c3e61 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 009016c6bd0f66447902c3bc79c4143d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 710c7bf5df8c16e44bfa2b67128c6065 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/VFXGraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed0d70da5652d2749a08603def710aa6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55dc8006737977f4eb79831ef2398da7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8203a3185ea9e4e42a13972def491cc2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 312100bdde457d043b34f4cbf470ea47 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 895cf7f2a6b44cc4eb35a5afbaf832e5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Unity.com.kuyuri.meshsparklyeffect.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8361b1a846caa3b4c917cff90238ab5f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b0329e0b4ebb4c46a773185e8e5f88a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Unity.com.kuyuri.meshsparklyeffect.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a54b6367e8b27714988a21392a5c049f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/RenderingAssets/UniversalRenderPipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8abc43bd4d6a9fe4286f8c46e6e5e871 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/RenderingAssets/UniversalRenderPipelineAsset_Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a57506ef33695104cb91e2fca13c71f6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/Materials/uv-checker.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54e184614c0e3b64fa83090ac4be3773 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/Global Volume Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f29aadf8035c53d409a12e3f193182f8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Resources/BakeToRenderTexture.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fec7193cdb5bc4b40874374e76c42d8f 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | preprocessorOverride: 0 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/BoxPhysicMaterial.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f8fbc9de606625418a0822d810df84e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 13400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/MeshSparklyEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62e114cda0c32a747ac639b8b9d7c3ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.0.0] - 2021-06-08 4 | 5 | - Add English documentation 6 | - Add LICENSE 7 | 8 | ## [0.3.0] - 2021-06-07 9 | 10 | ### Changes 11 | 12 | - Add Readme and documentation 13 | 14 | ## [0.2.0] - 2021-06-06 15 | 16 | ### Changes 17 | 18 | - Add convert and bake features. 19 | - Add MeshFilter Sample. 20 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/VFXGraph/Bar.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b456d8f022ca4e741946d1857abe1dbf 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/VFXGraph/SparkleShader.shadergraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d55e4a8d3459c24b86ebe649e80f83b 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Resources/MeshSparklyEffectInspector.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7c67374a14676b45987282ef7a02e13 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Resources/SkinnedMeshSparklyEffectInspector.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4187cd7f48feb9646bcc4a7064916f01 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/VFXGraph/ProceduralSparkle.shadersubgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9089925b735eb2439788cf1eb3080f8 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3} 11 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Resources/BakeToRenderTexture.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel BakeToRenderTexture 2 | 3 | uint VertexCount; 4 | StructuredBuffer PositionBuffer; 5 | 6 | RWTexture2D PositionMap; 7 | 8 | [numthreads(8, 8, 1)] 9 | void BakeToRenderTexture(uint2 id : SV_DispatchThreadID) 10 | { 11 | PositionMap[id] = float4(PositionBuffer[(id.x + id.y * id.x) % VertexCount], 1); 12 | } 13 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/MeshSparklyEffectInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e100915faa44f2449871e213836f8e4c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - meshSparklyEffectInspectorUXML: {fileID: 9197481963319205126, guid: 4c5601c207ef78b409fd3931bac0a201, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/SkinnedMeshSparklyEffectInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33a835bf6127471faaa6ba8a3361ee5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - skinnedMeshSparklyEffectInspectorUXML: {fileID: 9197481963319205126, guid: b1153343e1afee6428be9bc140462ae7, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Unity.com.kuyuri.meshsparklyeffect.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.com.kuyuri.meshsparklyeffect", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/BoxPhysicMaterial.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: BoxPhysicMaterial 10 | dynamicFriction: 0.6 11 | staticFriction: 0.6 12 | bounciness: 1 13 | frictionCombine: 0 14 | bounceCombine: 0 15 | -------------------------------------------------------------------------------- /ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 4 16 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Unity.com.kuyuri.meshsparklyeffect.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.com.kuyuri.meshsparklyeffect.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:8361b1a846caa3b4c917cff90238ab5f" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} 7 | m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} 8 | m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} 9 | m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 2 14 | m_RuntimeVersion: 12 15 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.kuyuri.meshsparklyeffect", 3 | "displayName": "MeshSparklyEffect", 4 | "version": "1.0.0", 5 | "unity": "2020.3", 6 | "description": "This is an effect for Unity that emits particles with a sparkling effect that matches the texture color from the specified mesh vertex position.", 7 | "dependencies": { 8 | "com.unity.visualeffectgraph": "10.5.0", 9 | "com.unity.render-pipelines.universal": "10.5.0" 10 | }, 11 | "samples": [ 12 | { 13 | "displayName": "MeshFilter Sample", 14 | "description": "Sample of sparkly effect from MeshFilter", 15 | "path": "Samples/MeshFilterSample" 16 | } 17 | ], 18 | "keywords": [ 19 | "vfx", 20 | "dynamic point cache" 21 | ], 22 | "author": { 23 | "name": "Kuyuri Iroha", 24 | "email": "kuyuri.iroha@gmail.com", 25 | "url": "https://kuyuri-iroha.com" 26 | }, 27 | "license": "MIT" 28 | } -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Kuyuri Iroha 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 1 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 1 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/unity 3 | # Edit at https://www.gitignore.io/?templates=unity 4 | 5 | ### Unity ### 6 | # This .gitignore file should be placed at the root of your Unity project directory 7 | # 8 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 9 | /[Ll]ibrary/ 10 | /[Tt]emp/ 11 | /[Oo]bj/ 12 | /[Bb]uild/ 13 | /[Bb]uilds/ 14 | /[Ll]ogs/ 15 | /[Mm]emoryCaptures/ 16 | 17 | # Never ignore Asset meta data 18 | !/[Aa]ssets/**/*.meta 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # TextMesh Pro files 24 | [Aa]ssets/TextMesh*Pro/ 25 | 26 | # Autogenerated Jetbrains Rider plugin 27 | [Aa]ssets/Plugins/Editor/JetBrains* 28 | 29 | # Visual Studio cache directory 30 | .vs/ 31 | 32 | # Gradle cache directory 33 | .gradle/ 34 | 35 | # Autogenerated VS/MD/Consulo solution and project files 36 | ExportedObj/ 37 | .consulo/ 38 | *.csproj 39 | *.unityproj 40 | *.sln 41 | *.suo 42 | *.tmp 43 | *.user 44 | *.userprefs 45 | *.pidb 46 | *.booproj 47 | *.svd 48 | *.pdb 49 | *.mdb 50 | *.opendb 51 | *.VC.db 52 | 53 | # Unity3D generated meta files 54 | *.pidb.meta 55 | *.pdb.meta 56 | *.mdb.meta 57 | 58 | # Unity3D generated file on crash reports 59 | sysinfo.txt 60 | 61 | # Builds 62 | *.apk 63 | *.unitypackage 64 | 65 | # Crashlytics generated file 66 | crashlytics-build.properties 67 | 68 | 69 | # End of https://www.gitignore.io/api/unity 70 | 71 | 72 | Assets/Scripts/CharactorControl_ease.cs 73 | Assets/Scripts/CharactorControl_ease.cs.meta 74 | .vs 75 | .idea/ 76 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/README_ja.md: -------------------------------------------------------------------------------- 1 | # MeshSparklyEffect 2 | 3 | ## 概要 4 | 5 | ![踊るパイモン](./Documentation/Images/pymon_demo.gif) 6 | 7 | 指定したメッシュの頂点位置からテクスチャ色に合ったキラキラ感のあるパーティクルを出すUnity用のエフェクトです。 8 | 9 | パーティクルには、十字に伸びるプロシージャルなものと、テクスチャの2種類を使用できます。 10 | 11 | 内部ではメッシュを指定した際に頂点情報をテクスチャに焼き込んでおり、焼き込んだテクスチャをEXRファイルとして保存することも可能です。 12 | 13 | 指定するメッシュの形式はSkinned Mesh RendererとMesh Filterに対応しています。 14 | 15 | なお、このエフェクトはアクセサリを始めとする小物類に使用することを想定して作成しているため、変形するメッシュには対応していません。 16 | 17 | ## Installation 18 | 19 | このアセットはUnity Package Manager (UPM)を使用してインストールできます。 20 | 21 | インストールに必要なパッケージは以下の通りです。 22 | 23 | (UPMを使用してインストールすることで自動的にインストールされます。) 24 | 25 | - Universal RP 26 | - Visual Effect Graph 27 | 28 | ### From git URL 29 | 30 | Window > Package Manager を開いて左上の+マークをクリックすると表示される`Add package from git URL...` 31 | をクリックすると表示される入力欄に`git+ssh://git@github.com/Kuyuri-Iroha/MeshSparklyEffect.git?path=/Assets/MeshSparklyEffect` 32 | と入力することで最新のバージョンをインストールすることができます。 33 | 34 | ### From local disk (Release) 35 | 36 | GitHubのReleaseからMeshSparklyEffect.zipをダウンロードして解凍した後、Window > Package Manager 37 | を開いて左上の+マークをクリックすると表示される`Add package from disk...`から解凍したフォルダを選択することでインストールできます。 38 | 39 | ## 使い方 40 | 41 | Project SettingsのGraphicsでScriptable Render Pipeline SettingsにUniversal Render Pipeline Assetが正しくセットされていることを確認した後、 42 | GameObjectにMeshSparklyEffect.csを追加することで、その下層にVisual Effectが追加されたGameObjectが生成されて動作します。 43 | 44 | 詳しくはドキュメントを御覧ください。 45 | 46 | [MeshSparklyEffectのドキュメント](./Documentation/MeshSparklyEffect.md) 47 | 48 | ## Unity Version & Dependencies 49 | 50 | 開発バージョン:2020.3.9 51 | 52 | - Universal RP 53 | - Visual Effect Graph 54 | -------------------------------------------------------------------------------- /UIElementsSchema/UIElements.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /README_ja.md: -------------------------------------------------------------------------------- 1 | # MeshSparklyEffect 2 | 3 | ## 概要 4 | 5 | ![踊るパイモン](./Assets/MeshSparklyEffect/Documentation/Images/pymon_demo.gif) 6 | 7 | 指定したメッシュの頂点位置からテクスチャ色に合ったキラキラ感のあるパーティクルを出すUnity用のエフェクトです。 8 | 9 | パーティクルには、十字に伸びるプロシージャルなものと、テクスチャの2種類を使用できます。 10 | 11 | 内部ではメッシュを指定した際に頂点情報をテクスチャに焼き込んでおり、焼き込んだテクスチャをEXRファイルとして保存することも可能です。 12 | 13 | 指定するメッシュの形式はSkinned Mesh RendererとMesh Filterに対応しています。 14 | 15 | なお、このエフェクトはアクセサリを始めとする小物類に使用することを想定して作成しているため、変形するメッシュには対応していません。 16 | 17 | ## Installation 18 | 19 | このアセットはUnity Package Manager (UPM)を使用してインストールできます。 20 | 21 | インストールに必要なパッケージは以下の通りです。 22 | 23 | (UPMを使用してインストールすることで自動的にインストールされます。) 24 | 25 | - Universal RP 26 | - Visual Effect Graph 27 | 28 | ### From git URL 29 | 30 | Window > Package Manager を開いて左上の+マークをクリックすると表示される`Add package from git URL...` 31 | をクリックすると表示される入力欄に`git+ssh://git@github.com/Kuyuri-Iroha/MeshSparklyEffect.git?path=/Assets/MeshSparklyEffect` 32 | と入力することで最新のバージョンをインストールすることができます。 33 | 34 | ### From local disk (Release) 35 | 36 | GitHubのReleaseからMeshSparklyEffect.zipをダウンロードして解凍した後、Window > Package Manager 37 | を開いて左上の+マークをクリックすると表示される`Add package from disk...`から解凍したフォルダを選択することでインストールできます。 38 | 39 | ## 使い方 40 | 41 | Project SettingsのGraphicsでScriptable Render Pipeline SettingsにUniversal Render Pipeline Assetが正しくセットされていることを確認した後、 42 | GameObjectにMeshSparklyEffect.csを追加することで、その下層にVisual Effectが追加されたGameObjectが生成されて動作します。 43 | 44 | 詳しくはドキュメントを御覧ください。 45 | 46 | [MeshSparklyEffectのドキュメント](./Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect.md) 47 | 48 | ## Unity Version & Dependencies 49 | 50 | 開発バージョン:2020.3.9 51 | 52 | - Universal RP 53 | - Visual Effect Graph 54 | 55 | ## Collaborator 56 | 57 | - [murasaqi](https://github.com/murasaqi) 58 | 59 | ## License 60 | 61 | [MIT License](LICENSE) 62 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/Global Volume Profile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} 13 | m_Name: Global Volume Profile 14 | m_EditorClassIdentifier: 15 | components: 16 | - {fileID: 1922199434906593844} 17 | --- !u!114 &1922199434906593844 18 | MonoBehaviour: 19 | m_ObjectHideFlags: 3 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_GameObject: {fileID: 0} 24 | m_Enabled: 1 25 | m_EditorHideFlags: 0 26 | m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3} 27 | m_Name: Bloom 28 | m_EditorClassIdentifier: 29 | active: 1 30 | m_AdvancedMode: 0 31 | threshold: 32 | m_OverrideState: 1 33 | m_Value: 0.9 34 | min: 0 35 | intensity: 36 | m_OverrideState: 1 37 | m_Value: 0.69 38 | min: 0 39 | scatter: 40 | m_OverrideState: 0 41 | m_Value: 0.7 42 | min: 0 43 | max: 1 44 | clamp: 45 | m_OverrideState: 0 46 | m_Value: 65472 47 | min: 0 48 | tint: 49 | m_OverrideState: 0 50 | m_Value: {r: 1, g: 1, b: 1, a: 1} 51 | hdr: 0 52 | showAlpha: 0 53 | showEyeDropper: 1 54 | highQualityFiltering: 55 | m_OverrideState: 0 56 | m_Value: 0 57 | skipIterations: 58 | m_OverrideState: 0 59 | m_Value: 1 60 | min: 0 61 | max: 16 62 | dirtTexture: 63 | m_OverrideState: 0 64 | m_Value: {fileID: 0} 65 | dirtIntensity: 66 | m_OverrideState: 0 67 | m_Value: 0 68 | min: 0 69 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ## Unity ## 2 | 3 | *.cs diff=csharp text 4 | *.cginc text 5 | *.shader text 6 | 7 | *.mat merge=unityyamlmerge eol=lf 8 | *.anim merge=unityyamlmerge eol=lf 9 | *.unity merge=unityyamlmerge eol=lf 10 | *.prefab merge=unityyamlmerge eol=lf 11 | *.physicsMaterial2D merge=unityyamlmerge eol=lf 12 | *.physicMaterial merge=unityyamlmerge eol=lf 13 | *.asset merge=unityyamlmerge eol=lf 14 | *.meta merge=unityyamlmerge eol=lf 15 | *.controller merge=unityyamlmerge eol=lf 16 | 17 | 18 | ## git-lfs ## 19 | 20 | #Image 21 | *.jpg filter=lfs diff=lfs merge=lfs -text 22 | *.jpeg filter=lfs diff=lfs merge=lfs -text 23 | *.png filter=lfs diff=lfs merge=lfs -text 24 | *.gif filter=lfs diff=lfs merge=lfs -text 25 | *.psd filter=lfs diff=lfs merge=lfs -text 26 | *.ai filter=lfs diff=lfs merge=lfs -text 27 | *.tif fliter=lfs diff=lfs merge=lfs -text 28 | 29 | #Audio 30 | *.mp3 filter=lfs diff=lfs merge=lfs -text 31 | *.wav filter=lfs diff=lfs merge=lfs -text 32 | *.ogg filter=lfs diff=lfs merge=lfs -text 33 | 34 | #Video 35 | *.mp4 filter=lfs diff=lfs merge=lfs -text 36 | *.mov filter=lfs diff=lfs merge=lfs -text 37 | 38 | #3D Object 39 | *.FBX filter=lfs diff=lfs merge=lfs -text 40 | *.fbx filter=lfs diff=lfs merge=lfs -text 41 | *.blend filter=lfs diff=lfs merge=lfs -text 42 | *.obj filter=lfs diff=lfs merge=lfs -text 43 | 44 | #ETC 45 | *.a filter=lfs diff=lfs merge=lfs -text 46 | *.exr filter=lfs diff=lfs merge=lfs -text 47 | *.tga filter=lfs diff=lfs merge=lfs -text 48 | *.pdf filter=lfs diff=lfs merge=lfs -text 49 | *.zip filter=lfs diff=lfs merge=lfs -text 50 | *.dll filter=lfs diff=lfs merge=lfs -text 51 | *.unitypackage filter=lfs diff=lfs merge=lfs -text 52 | *.aif filter=lfs diff=lfs merge=lfs -text 53 | *.ttf filter=lfs diff=lfs merge=lfs -text 54 | *.rns filter=lfs diff=lfs merge=lfs -text 55 | *.reason filter=lfs diff=lfs merge=lfs -text 56 | *.lxo filter=lfs diff=lfs merge=lfs -text 57 | 58 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/Materials/uv-checker.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-1362296569040562040 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 4 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 6 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: uv-checker 24 | m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} 25 | m_ShaderKeywords: 26 | m_LightmapFlags: 4 27 | m_EnableInstancingVariants: 0 28 | m_DoubleSidedGI: 0 29 | m_CustomRenderQueue: 2000 30 | stringTagMap: 31 | RenderType: Opaque 32 | disabledShaderPasses: [] 33 | m_SavedProperties: 34 | serializedVersion: 3 35 | m_TexEnvs: 36 | - _BaseMap: 37 | m_Texture: {fileID: 2800000, guid: f65ce040772c9f74fba8506cf9ab7f29, type: 3} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 2800000, guid: f65ce040772c9f74fba8506cf9ab7f29, type: 3} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | m_Floats: 45 | - _AlphaClip: 0 46 | - _Blend: 0 47 | - _Cull: 2 48 | - _Cutoff: 0.5 49 | - _DstBlend: 0 50 | - _QueueOffset: 0 51 | - _SampleGI: 0 52 | - _SrcBlend: 1 53 | - _Surface: 0 54 | - _ZWrite: 1 55 | m_Colors: 56 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 57 | - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} 58 | m_BuildTextureStacks: [] 59 | -------------------------------------------------------------------------------- /Assets/RenderingAssets/UniversalRenderPipelineAsset_Renderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: UniversalRenderPipelineAsset_Renderer 14 | m_EditorClassIdentifier: 15 | m_RendererFeatures: [] 16 | m_RendererFeatureMap: 17 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 18 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 19 | shaders: 20 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 21 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 22 | screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3} 23 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 24 | tileDepthInfoPS: {fileID: 0} 25 | tileDeferredPS: {fileID: 0} 26 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 27 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 28 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 29 | m_OpaqueLayerMask: 30 | serializedVersion: 2 31 | m_Bits: 4294967295 32 | m_TransparentLayerMask: 33 | serializedVersion: 2 34 | m_Bits: 4294967295 35 | m_DefaultStencilState: 36 | overrideStencilState: 0 37 | stencilReference: 0 38 | stencilCompareFunction: 8 39 | passOperation: 2 40 | failOperation: 0 41 | zFailOperation: 0 42 | m_ShadowTransparentReceive: 1 43 | m_RenderingMode: 0 44 | m_AccurateGbufferNormals: 0 45 | -------------------------------------------------------------------------------- /Assets/RenderingAssets/UniversalRenderPipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: UniversalRenderPipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 6 16 | k_AssetPreviousVersion: 5 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: a57506ef33695104cb91e2fca13c71f6, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 1 23 | m_RequireOpaqueTexture: 1 24 | m_OpaqueDownsampling: 3 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_MSAA: 8 28 | m_RenderScale: 1 29 | m_MainLightRenderingMode: 1 30 | m_MainLightShadowsSupported: 1 31 | m_MainLightShadowmapResolution: 4096 32 | m_AdditionalLightsRenderingMode: 1 33 | m_AdditionalLightsPerObjectLimit: 4 34 | m_AdditionalLightShadowsSupported: 0 35 | m_AdditionalLightsShadowmapResolution: 512 36 | m_ShadowDistance: 20 37 | m_ShadowCascadeCount: 4 38 | m_Cascade2Split: 0.25 39 | m_Cascade3Split: {x: 0.1, y: 0.3} 40 | m_Cascade4Split: {x: 0.012999999, y: 0.1355, z: 0.30650002} 41 | m_ShadowDepthBias: 6.62 42 | m_ShadowNormalBias: 0.55 43 | m_SoftShadowsSupported: 0 44 | m_UseSRPBatcher: 1 45 | m_SupportsDynamicBatching: 0 46 | m_MixedLightingSupported: 1 47 | m_DebugLevel: 0 48 | m_UseAdaptivePerformance: 1 49 | m_ColorGradingMode: 1 50 | m_ColorGradingLutSize: 32 51 | m_ShadowType: 1 52 | m_LocalShadowsSupported: 0 53 | m_LocalShadowsAtlasResolution: 256 54 | m_MaxPixelLights: 0 55 | m_ShadowAtlasResolution: 256 56 | m_ShaderVariantLogLevel: 0 57 | m_ShadowCascades: 0 58 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedScenePath-0: 9 | value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d 10 | flags: 0 11 | RecentlyUsedScenePath-1: 12 | value: 22424703114646680e0b0227036c7b1514021f192f2d2835633c133af6f9 13 | flags: 0 14 | UIBuilder.EditorExtensionModeKey: 15 | value: 37434103 16 | flags: 0 17 | UIBuilder.HideNotificationAboutMissingUITKPackage: 18 | value: 37434103 19 | flags: 0 20 | UnityEditor.ShaderGraph.Blackboard: 21 | value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9af8ffaeffff8e85dd8390e3949c8899daa7 22 | flags: 0 23 | UnityEditor.ShaderGraph.FloatingWindowsLayout2: 24 | value: 181344140043005e1a220d3b1f364b524c0c5a27130c293326201334cee5322ca0bd30e8eb293a707b0fd0180b3d0a36fc0d3d04e649500d1002ee0b5dbd1d2c27c00ad113cb1e10e41f1addc80993b9878f9aba94a9eae7f6d0b2fbeeffe0ecf4fd8afdacbbf9d4e8f5ace5e1928b86ccf584cdd6c38b9da190c991e48280869786c994c0c5828a8bd8eeddbf8dba 25 | flags: 0 26 | UnityEditor.ShaderGraph.InspectorWindow: 27 | value: 18135939215a0a5004000b0e15254b524c1119263f2d6a722016393ce1eb3d36e5d339f9a5602b2e2c07a37e0901373ae01e0008f707250d171df81a53a5485d41895ac825e0100ec20313c0d91cddccd3d0c7efcca9bd8f908fecb0f9cfddf1eff4e7a1b1eae482f0fcaee1e1928b86d888ed969b938797a7cf 28 | flags: 0 29 | vcSharedLogLevel: 30 | value: 0d5e400f0650 31 | flags: 0 32 | m_VCAutomaticAdd: 1 33 | m_VCDebugCom: 0 34 | m_VCDebugCmd: 0 35 | m_VCDebugOut: 0 36 | m_SemanticMergeMode: 2 37 | m_VCShowFailedCheckout: 1 38 | m_VCOverwriteFailedCheckoutAssets: 1 39 | m_VCProjectOverlayIcons: 1 40 | m_VCHierarchyOverlayIcons: 1 41 | m_VCOtherOverlayIcons: 1 42 | m_VCAllowAsyncUpdate: 1 43 | -------------------------------------------------------------------------------- /UIElementsSchema/UnityEditor.UIElements.Debugger.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/README.md: -------------------------------------------------------------------------------- 1 | # MeshSparklyEffect 2 | 3 | [日本語版](./README_ja.md) 4 | 5 | ## Overview 6 | 7 | ![Dancing Pymon](./Documentation/Images/pymon_demo.gif) 8 | 9 | An effect for Unity that emits particles with sparkly effect matches the texture color from the specified mesh vertex position. 10 | 11 | Two types of particles can be used: procedural ones that extend in a cross pattern, and textures. 12 | 13 | Internally, vertex information is burned into textures when a mesh is specified, and the burned textures can be saved as EXR files. 14 | 15 | Skinned Mesh Renderer and Mesh Filter are supported for the mesh format. 16 | 17 | This effect is designed to be used with accessories and other items, so it does not support deformable meshes. 18 | 19 | ## Installation 20 | 21 | This asset can be installed using the Unity Package Manager (UPM). 22 | 23 | The packages required for installation are as follows. 24 | 25 | (Will be installed automatically by installing using UPM.) 26 | 27 | - Universal RP 28 | - Visual Effect Graph 29 | 30 | ### From git URL 31 | 32 | Open `Window > Package Manager` and click the + sign in the upper left corner to display `Add package from git URL...` 33 | You can install the latest version by typing `git+ssh://git@github.com/Kuyuri-Iroha/MeshSparklyEffect.git?path=/Assets/MeshSparklyEffect` in the input field that appears when you click to install the latest version. 34 | 35 | ### From local disk (Release) 36 | 37 | Download MeshSparklyEffect.zip from Release on GitHub, unzip it, and then open `Window > Package Manager` and click the + sign in the upper left corner. Then, click `Add package from disk...` and select unziped folder to install. 38 | 39 | ## Usage 40 | 41 | After making sure that the Universal Render Pipeline Asset is set correctly in the Scriptable Render Pipeline Settings in the Graphics section of Project Settings, add MeshSparklyEffect.cs to the GameObject, which will generate a GameObject with a Visual Effect added to its lower layer and work. 42 | 43 | See the documentation for details. 44 | 45 | [Documentation for MeshSparklyEffect](./Documentation/MeshSparklyEffect.md) 46 | 47 | ## Unity Version & Dependencies 48 | 49 | Development version:2020.3.9 50 | 51 | - Universal RP 52 | - Visual Effect Graph 53 | -------------------------------------------------------------------------------- /UIElementsSchema/UIToolkitExtensions.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.3.9", 4 | "com.unity.formats.fbx": "4.0.1", 5 | "com.unity.ide.rider": "2.0.7", 6 | "com.unity.ide.visualstudio": "2.0.7", 7 | "com.unity.ide.vscode": "1.2.3", 8 | "com.unity.render-pipelines.universal": "10.5.0", 9 | "com.unity.springbone": "https://github.com/unity3d-jp/UnityChanSpringBone.git#release/1.2", 10 | "com.unity.test-framework": "1.1.24", 11 | "com.unity.textmeshpro": "3.0.6", 12 | "com.unity.timeline": "1.4.8", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.ui": "1.0.0-preview.14", 15 | "com.unity.ui.builder": "1.0.0-preview.14", 16 | "com.unity.universaltoonshader.urp": "https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project.git#release/urp/2.2.3", 17 | "com.unity.visualeffectgraph": "10.5.0", 18 | "com.unity.modules.ai": "1.0.0", 19 | "com.unity.modules.androidjni": "1.0.0", 20 | "com.unity.modules.animation": "1.0.0", 21 | "com.unity.modules.assetbundle": "1.0.0", 22 | "com.unity.modules.audio": "1.0.0", 23 | "com.unity.modules.cloth": "1.0.0", 24 | "com.unity.modules.director": "1.0.0", 25 | "com.unity.modules.imageconversion": "1.0.0", 26 | "com.unity.modules.imgui": "1.0.0", 27 | "com.unity.modules.jsonserialize": "1.0.0", 28 | "com.unity.modules.particlesystem": "1.0.0", 29 | "com.unity.modules.physics": "1.0.0", 30 | "com.unity.modules.physics2d": "1.0.0", 31 | "com.unity.modules.screencapture": "1.0.0", 32 | "com.unity.modules.terrain": "1.0.0", 33 | "com.unity.modules.terrainphysics": "1.0.0", 34 | "com.unity.modules.tilemap": "1.0.0", 35 | "com.unity.modules.ui": "1.0.0", 36 | "com.unity.modules.uielements": "1.0.0", 37 | "com.unity.modules.umbra": "1.0.0", 38 | "com.unity.modules.unityanalytics": "1.0.0", 39 | "com.unity.modules.unitywebrequest": "1.0.0", 40 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 41 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 42 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 43 | "com.unity.modules.unitywebrequestwww": "1.0.0", 44 | "com.unity.modules.vehicles": "1.0.0", 45 | "com.unity.modules.video": "1.0.0", 46 | "com.unity.modules.vr": "1.0.0", 47 | "com.unity.modules.wind": "1.0.0", 48 | "com.unity.modules.xr": "1.0.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MeshSparklyEffect 2 | 3 | [日本語版](./README_ja.md) 4 | 5 | ## Overview 6 | 7 | ![Dancing Pymon](./Assets/MeshSparklyEffect/Documentation/Images/pymon_demo.gif) 8 | 9 | An effect for Unity that emits particles with sparkly effect matches the texture color from the specified mesh vertex position. 10 | 11 | Two types of particles can be used: procedural ones that extend in a cross pattern, and textures. 12 | 13 | Internally, vertex information is burned into textures when a mesh is specified, and the burned textures can be saved as EXR files. 14 | 15 | Skinned Mesh Renderer and Mesh Filter are supported for the mesh format. 16 | 17 | This effect is designed to be used with accessories and other items, so it does not support deformable meshes. 18 | 19 | ## Installation 20 | 21 | This asset can be installed using the Unity Package Manager (UPM). 22 | 23 | The packages required for installation are as follows. 24 | 25 | (Will be installed automatically by installing using UPM.) 26 | 27 | - Universal RP 28 | - Visual Effect Graph 29 | 30 | ### From git URL 31 | 32 | Open `Window > Package Manager` and click the + sign in the upper left corner to display `Add package from git URL...` 33 | You can install the latest version by typing `git+ssh://git@github.com/Kuyuri-Iroha/MeshSparklyEffect.git?path=/Assets/MeshSparklyEffect` in the input field that appears when you click to install the latest version. 34 | 35 | ### From local disk (Release) 36 | 37 | Download MeshSparklyEffect.zip from Release on GitHub, unzip it, and then open `Window > Package Manager` and click the + sign in the upper left corner. Then, click `Add package from disk...` and select unziped folder to install. 38 | 39 | ## Usage 40 | 41 | After making sure that the Universal Render Pipeline Asset is set correctly in the Scriptable Render Pipeline Settings in the Graphics section of Project Settings, add MeshSparklyEffect.cs to the GameObject, which will generate a GameObject with a Visual Effect added to its lower layer and work. 42 | 43 | See the documentation for details. 44 | 45 | [Documentation for MeshSparklyEffect](./Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect.md) 46 | 47 | ## Unity Version & Dependencies 48 | 49 | Development version:2020.3.9 50 | 51 | - Universal RP 52 | - Visual Effect Graph 53 | 54 | ## Collaborator 55 | 56 | - [murasaqi](https://github.com/murasaqi) 57 | 58 | ## License 59 | 60 | [MIT License](LICENSE) 61 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 41 | m_CustomRenderPipeline: {fileID: 11400000, guid: 8abc43bd4d6a9fe4286f8c46e6e5e871, type: 2} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_DefaultRenderingLayerMask: 1 63 | m_LogWhenShaderIsCompiled: 0 64 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/inspector.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dc4e7df63805f34aa9fa19f53ac6c6a 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/pymon_demo.gif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a434ea1e0ad9c14c938784fd38b7d53 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/Images/vertex_map.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da7d34ffdbb6ada4188c79da5ad8819a 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Samples/MeshFilterSample/MeshFilterSample/uv-checker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f65ce040772c9f74fba8506cf9ab7f29 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect_ja.md: -------------------------------------------------------------------------------- 1 | # MeshSparklyEffect ドキュメント 2 | 3 | ## 使い方 4 | 5 | 0. Project SettingsのGraphicsでScriptable Render Pipeline SettingsにUniversal Render Pipeline Assetが正しくセットされていることを確認 6 | 1. GameObjectにMeshSparklyEffect.csを追加 7 | 1. The SkinnedMeshRenderer is missing.というエラーとともに、Switch MeshFilterボタンとSkinned Mesh Rendererを指定するプロパティが現れる 8 | 1. ここにSkinned Mesh Rendererを指定することでエフェクトを調整するパラメータが現れる(Switch MeshFilter Modeボタンを押すことでMeshFilterを指定することも可能) 9 | 1. MeshSparklyEffectのインスペクタにエフェクトを調整するパラメータが現れたら、各プロパティを調整することでエフェクトの見た目を変えることができる 10 | 11 | ## UIの各項目の説明 12 | 13 | ![インスペクター画面](./Images/inspector.png) 14 | 15 | ### Switch MeshFilter/SkinnedMeshRenderer Mode ボタン 16 | 17 | このボタンを押すことでSkinned Mesh RendererとMeshFilterのどちらを使用するかを切り替えることができる。 18 | 19 | また、切り替え先のMeshが登録されていなかった場合はインスペクタ上部にエラーが表示されて各パラメータが隠された初期状態に戻る。 20 | 21 | ### Target SkinnedMeshRenderer/MeshFilter 22 | 23 | 対象となるメッシュの指定。ここに指定したメッシュの頂点情報を元にパーティクルの位置を決定する。 24 | 25 | ただし、ここの指定だけではMeshのTransformには追従しないので、下層に追加されるVisual 26 | Effectの付いたGameObjectにConstraintを追加するなどして追従させる必要がある(一例として、MeshFilterというサンプルシーンではParent Constraintを使用している) 27 | 28 | ### Color Texture 29 | 30 | パーティクルに色を付けるために使うテクスチャ。指定したメッシュのUVを使用してテクスチャ上の色をパーティクルに反映するため、指定しているメッシュで使用しているテクスチャを使用するとパーティクルが出た頂点位置に対応した色が反映される。 31 | 32 | ### Rate 33 | 34 | パーティクルが出る頻度。この値が大きいほど、短時間に多くのパーティクルが出てくる。 35 | 36 | ### Alpha 37 | 38 | パーティクルのAlpha値。 39 | 40 | ### Size Decay Curve 41 | 42 | パーティクルのサイズがLife Timeに応じてどのように変化するかを指定するAnimation Curve。実際のパーティクルサイズはSize Min-Maxで指定された範囲内のランダムな値と、このSize Decay Curveをかけた値で決定する。 43 | 44 | ### Size Min-Max 45 | 46 | ランダムに決定されるパーティクルのサイズの範囲を指定する。MinとMaxを同じ値にすることで、一意のサイズに固定することも可能。 47 | 48 | また、このMinMaxSliderはLow LimitとHigh Limitを変更することで、スライダーで動かすことが可能な最小値と最大値を指定することができる。 49 | 50 | ### Life Time Min-Max 51 | 52 | ランダムに決定されるパーティクルの表示時間の範囲を指定する。Size Min-Maxと同じく、同じ値にすることで固定可能。 53 | 54 | ### Emission Intensity 55 | 56 | パーティクルのEmission強度。 57 | 58 | ### Rotate Degree 59 | 60 | パーティクルの回転角を度数法で指定する。 61 | 62 | ### Offset 63 | 64 | パーティクルの出現位置を、メッシュの頂点位置から法線方向に向かってどれだけずらすかを指定する。この値を調整してパーティクルがメッシュと重ならないように調整する。 65 | 66 | ### Switch Texture/Procedural Mode ボタン 67 | 68 | このボタンは、十字形のプロシージャルなパーティクルを使用するか、テクスチャをパーティクルとして使用するかを切り替えることができる。 69 | 70 | このボタンを押してモードを切り替えると、現在のモードに合ったパラメータが表示される。 71 | 72 | ### Spike Width (Procedural Mode) 73 | 74 | 十字形のパーティクルのスパイクの太さを指定する。 75 | 76 | ### Sparkle Texture (Texture Mode) 77 | 78 | パーティクルとして使用するテクスチャを指定する。 79 | 80 | ### Convert to Map/Mesh ボタン 81 | 82 | メッシュの頂点情報から生成したテクスチャをインスペクタに表示する。Convert to Meshとボタンに表示されているときに再度押すことで元のMeshを表示するモードに戻すことができる。 83 | 84 | ![Convert to Map画面](./Images/vertex_map.png) 85 | 86 | Bakeボタンを押すと、各テクスチャを保存するディレクトリを指定するためのWindowが表示され、指定した場所にメッシュの名前とそれぞれのマップ名の組み合わせをファイル名としたEXRファイルとして保存される。 -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/MeshSparklyEffect.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.VFX; 3 | 4 | namespace MeshSparklyEffect 5 | { 6 | [ExecuteAlways] 7 | public class MeshSparklyEffect : MonoBehaviour 8 | { 9 | public SkinnedMeshRenderer targetMesh; 10 | public MeshFilter targetMeshFilter; 11 | public bool useMeshFilter; 12 | public Texture2D colorTexture; 13 | 14 | public bool isMapMode; 15 | 16 | public SparkleVFX sparkleVFX = new SparkleVFX(); 17 | 18 | public Texture2D positionMap = null; 19 | public Texture2D normalMap = null; 20 | public Texture2D uvMap = null; 21 | 22 | private int _targetMeshInstanceID; 23 | private int _targetMeshFilterInstanceID; 24 | 25 | private Mesh GetMesh() 26 | { 27 | return useMeshFilter ? targetMeshFilter.sharedMesh : targetMesh.sharedMesh; 28 | } 29 | 30 | public void CreateMaps() 31 | { 32 | positionMap = MeshToMap.ToPositionMap(GetMesh()); 33 | normalMap = MeshToMap.ToNormalMap(GetMesh()); 34 | uvMap = MeshToMap.ToUVMap(GetMesh()); 35 | 36 | _targetMeshInstanceID = targetMesh.GetInstanceID(); 37 | _targetMeshFilterInstanceID = targetMeshFilter.GetInstanceID(); 38 | } 39 | 40 | private void AddVFX() 41 | { 42 | var visualEffect = transform.GetComponentInChildren(); 43 | if (visualEffect != null) 44 | { 45 | sparkleVFX.SetSparklyVFX(visualEffect); 46 | return; 47 | } 48 | 49 | var vfx = Resources.Load($"Sparkle"); 50 | var vfxGameObject = new GameObject("VFX"); 51 | visualEffect = vfxGameObject.AddComponent(); 52 | visualEffect.visualEffectAsset = vfx; 53 | sparkleVFX.SetSparklyVFX(visualEffect); 54 | 55 | vfxGameObject.transform.SetParent(transform); 56 | vfxGameObject.transform.localPosition = Vector3.zero; 57 | vfxGameObject.transform.localRotation = Quaternion.identity; 58 | vfxGameObject.transform.localScale = Vector3.one; 59 | } 60 | 61 | private void Start() 62 | { 63 | AddVFX(); 64 | sparkleVFX.GetInitialProperties(); 65 | } 66 | 67 | private void Update() 68 | { 69 | if (sparkleVFX == null) return; 70 | 71 | if (ResourcesHasChanged()) CreateMaps(); 72 | sparkleVFX.SetProperties(colorTexture, positionMap, normalMap, uvMap); 73 | } 74 | 75 | private bool ResourcesHasChanged() 76 | { 77 | return targetMesh != null && _targetMeshInstanceID != targetMesh.GetInstanceID() || 78 | targetMeshFilter != null && _targetMeshFilterInstanceID != targetMeshFilter.GetInstanceID(); 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Resources/SkinnedMeshSparklyEffectInspector.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /UIElementsSchema/GlobalNamespace.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /UIElementsSchema/UnityEditor.ShaderGraph.Drawing.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/MeshToMap.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Unity.Collections; 4 | using UnityEngine; 5 | 6 | namespace MeshSparklyEffect 7 | { 8 | public static class MeshToMap 9 | { 10 | public static Texture2D ToPositionMap(Mesh mesh) 11 | { 12 | var vertices = mesh.vertices; 13 | var count = vertices.Count(); 14 | 15 | var r = Mathf.Sqrt(count); 16 | var width = (int) Mathf.Ceil(r); 17 | 18 | var colors = new Color[width * width]; 19 | for (var i = 0; i < width * width; i++) 20 | { 21 | var vtx = vertices[i % count]; 22 | colors[i] = new Color(vtx.x, vtx.y, vtx.z); 23 | } 24 | 25 | var tex = CreateMap(colors, width, width); 26 | 27 | return tex; 28 | } 29 | 30 | public static void ToPositionMapWithGPU(Mesh.MeshData meshData, ComputeShader compute, 31 | ComputeBuffer positionBuffer, RenderTexture positionMap) 32 | { 33 | var vertexCount = meshData.vertexCount; 34 | 35 | using var positionArray = 36 | new NativeArray(vertexCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); 37 | meshData.GetVertices(positionArray); 38 | positionBuffer.SetData(positionArray, 0, 0, vertexCount); 39 | 40 | var bakeKernelID = compute.FindKernel("BakeToRenderTexture"); 41 | compute.SetInt("VertexCount", vertexCount); 42 | compute.SetBuffer(bakeKernelID, "PositionBuffer", positionBuffer); 43 | compute.SetTexture(bakeKernelID, "PositionMap", positionMap); 44 | 45 | var width = positionMap.width; 46 | var height = positionMap.height; 47 | compute.Dispatch(bakeKernelID, width / 8, height / 8, 1); 48 | } 49 | 50 | public static Texture2D ToUVMap(Mesh mesh) 51 | { 52 | var uvs = mesh.uv; 53 | var count = uvs.Count(); 54 | 55 | var r = Mathf.Sqrt(count); 56 | var width = (int) Mathf.Ceil(r); 57 | 58 | var colors = new Color[width * width]; 59 | for (var i = 0; i < width * width; i++) 60 | { 61 | var uv = uvs[i % count]; 62 | colors[i] = new Color(uv.x, uv.y, 0.0f); 63 | } 64 | 65 | var tex = CreateMap(colors, width, width); 66 | 67 | return tex; 68 | } 69 | 70 | public static Texture2D ToNormalMap(Mesh mesh) 71 | { 72 | var normals = mesh.normals; 73 | var count = normals.Count(); 74 | 75 | var r = Mathf.Sqrt(count); 76 | var width = (int) Mathf.Ceil(r); 77 | 78 | var colors = new Color[width * width]; 79 | for (var i = 0; i < width * width; i++) 80 | { 81 | var norm = normals[i % count]; 82 | colors[i] = new Color(norm.x, norm.y, norm.z); 83 | } 84 | 85 | var tex = CreateMap(colors, width, width); 86 | 87 | return tex; 88 | } 89 | 90 | private static Texture2D CreateMap(IEnumerable colors, int width, int height) 91 | { 92 | var tex = new Texture2D(width, height, TextureFormat.RGBAFloat, false) 93 | { 94 | filterMode = FilterMode.Point, wrapMode = TextureWrapMode.Clamp 95 | }; 96 | 97 | var buf = new Color[width * height]; 98 | 99 | var idx = 0; 100 | foreach (var color in colors) 101 | { 102 | buf[idx] = color; 103 | idx++; 104 | } 105 | 106 | tex.SetPixels(buf); 107 | tex.Apply(); 108 | 109 | return tex; 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /UIElementsSchema/UnityEditor.Rendering.LookDev.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/SkinnedMeshSparklyEffect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using UnityEngine; 4 | using UnityEngine.VFX; 5 | 6 | namespace MeshSparklyEffect 7 | { 8 | [ExecuteAlways] 9 | public class SkinnedMeshSparklyEffect : MonoBehaviour 10 | { 11 | public SkinnedMeshRenderer targetMesh; 12 | public Texture2D colorTexture; 13 | 14 | public SparkleVFX sparkleVFX = new SparkleVFX(); 15 | 16 | public RenderTexture positionMap; 17 | public Texture2D normalMap; 18 | public Texture2D uvMap; 19 | 20 | private int _targetMeshInstanceID; 21 | 22 | private ComputeShader _compute; 23 | private ComputeBuffer _positionBuffer; 24 | private Mesh _tmpMesh; 25 | 26 | public void CreateMaps() 27 | { 28 | normalMap = MeshToMap.ToNormalMap(targetMesh.sharedMesh); 29 | uvMap = MeshToMap.ToNormalMap(targetMesh.sharedMesh); 30 | 31 | _targetMeshInstanceID = targetMesh.GetInstanceID(); 32 | 33 | // Position map 34 | var vertexCount = targetMesh.sharedMesh.vertexCount; 35 | _positionBuffer?.Dispose(); 36 | _positionBuffer = new ComputeBuffer(vertexCount, Marshal.SizeOf()); 37 | var r = Mathf.Sqrt(vertexCount); 38 | var width = (int) Mathf.Ceil(r); 39 | width = width / 8 * 8; 40 | positionMap = new RenderTexture(width, width, 0, RenderTextureFormat.ARGBFloat) 41 | { 42 | hideFlags = HideFlags.DontSave, 43 | enableRandomWrite = true 44 | }; 45 | positionMap.Create(); 46 | } 47 | 48 | public void Initialize() 49 | { 50 | _compute = Resources.Load("BakeToRenderTexture"); 51 | 52 | _tmpMesh = new Mesh(); 53 | _tmpMesh.hideFlags = HideFlags.DontSave; 54 | } 55 | 56 | private void AddVFX() 57 | { 58 | var visualEffect = transform.GetComponentInChildren(); 59 | if (visualEffect != null) 60 | { 61 | sparkleVFX.SetSparklyVFX(visualEffect); 62 | return; 63 | } 64 | 65 | var vfx = Resources.Load($"Sparkle"); 66 | var vfxGameObject = new GameObject("VFX"); 67 | visualEffect = vfxGameObject.AddComponent(); 68 | visualEffect.visualEffectAsset = vfx; 69 | sparkleVFX.SetSparklyVFX(visualEffect); 70 | 71 | vfxGameObject.transform.SetParent(transform); 72 | vfxGameObject.transform.localPosition = Vector3.zero; 73 | vfxGameObject.transform.localRotation = Quaternion.identity; 74 | vfxGameObject.transform.localScale = Vector3.one; 75 | } 76 | 77 | private void UpdatePositionMap() 78 | { 79 | targetMesh.BakeMesh(_tmpMesh); 80 | 81 | using var dataArray = Mesh.AcquireReadOnlyMeshData(_tmpMesh); 82 | var data = dataArray[0]; 83 | MeshToMap.ToPositionMapWithGPU(data, _compute, _positionBuffer, positionMap); 84 | } 85 | 86 | private void Start() 87 | { 88 | Initialize(); 89 | AddVFX(); 90 | sparkleVFX.GetInitialProperties(); 91 | } 92 | 93 | private void LateUpdate() 94 | { 95 | if (sparkleVFX == null || targetMesh == null) return; 96 | 97 | if (ResourcesHasChanged()) CreateMaps(); 98 | UpdatePositionMap(); 99 | sparkleVFX.SetProperties(colorTexture, positionMap, normalMap, uvMap); 100 | } 101 | 102 | private void OnDisable() => Dispose(); 103 | 104 | private void OnDestroy() => Dispose(); 105 | 106 | private void Dispose() 107 | { 108 | _positionBuffer?.Dispose(); 109 | _positionBuffer = null; 110 | } 111 | 112 | private bool ResourcesHasChanged() 113 | { 114 | return targetMesh != null && _targetMeshInstanceID != targetMesh.GetInstanceID(); 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/Resources/MeshSparklyEffectInspector.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Runtime/Scripts/SparkleVFX.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.VFX; 4 | 5 | namespace MeshSparklyEffect 6 | { 7 | [Serializable] 8 | public class SparkleVFX 9 | { 10 | private VisualEffect _effect; 11 | 12 | public uint rate; 13 | [Range(0.0f, 1.0f)] public float width; 14 | [Range(0.0f, 1.0f)] public float alpha; 15 | public AnimationCurve sizeDecayCurve; 16 | public float sizeMin; 17 | public float sizeMax; 18 | public float sizeLowLimit = 0.0f; 19 | public float sizeHighLimit = 10.0f; 20 | public float lifeTimeMin; 21 | public float lifeTimeMax; 22 | public float lifeTimeLowLimit = 0.0f; 23 | public float lifeTimeHighLimit = 10.0f; 24 | public float emissionIntensity; 25 | public float rotateDegree; 26 | public float offset; 27 | public bool useTexture; 28 | public Texture2D sparkleTexture; 29 | 30 | private static readonly int RateID = Shader.PropertyToID("Rate"); 31 | private static readonly int WidthID = Shader.PropertyToID("Width"); 32 | private static readonly int AlphaID = Shader.PropertyToID("Alpha"); 33 | private static readonly int SizeDecayCurveID = Shader.PropertyToID("SizeDecayCurve"); 34 | private static readonly int SizeMinID = Shader.PropertyToID("SizeMin"); 35 | private static readonly int SizeMaxID = Shader.PropertyToID("SizeMax"); 36 | private static readonly int LifeTimeMinID = Shader.PropertyToID("LifeTimeMin"); 37 | private static readonly int LifeTimeMaxID = Shader.PropertyToID("LifeTimeMax"); 38 | private static readonly int EmissionIntensityID = Shader.PropertyToID("EmissionIntensity"); 39 | private static readonly int RotateDegreeID = Shader.PropertyToID("RotateDegree"); 40 | private static readonly int OffsetID = Shader.PropertyToID("Offset"); 41 | private static readonly int UseTextureID = Shader.PropertyToID("UseTexture"); 42 | private static readonly int SparkleTextureID = Shader.PropertyToID("SparkleTexture"); 43 | 44 | public void SetSparklyVFX(VisualEffect sparklyEffect) 45 | { 46 | _effect = sparklyEffect; 47 | } 48 | 49 | public void GetInitialProperties() 50 | { 51 | if (!_effect) return; 52 | 53 | rate = _effect.GetUInt(RateID); 54 | width = _effect.GetFloat(WidthID); 55 | alpha = _effect.GetFloat(AlphaID); 56 | sizeDecayCurve = _effect.GetAnimationCurve(SizeDecayCurveID); 57 | sizeMin = _effect.GetFloat(SizeMinID); 58 | sizeMax = _effect.GetFloat(SizeMaxID); 59 | lifeTimeMin = _effect.GetFloat(LifeTimeMinID); 60 | lifeTimeMax = _effect.GetFloat(LifeTimeMaxID); 61 | emissionIntensity = _effect.GetFloat(EmissionIntensityID); 62 | rotateDegree = _effect.GetFloat(RotateDegreeID); 63 | offset = _effect.GetFloat(OffsetID); 64 | useTexture = _effect.GetBool(UseTextureID); 65 | sparkleTexture = _effect.GetTexture(SparkleTextureID) as Texture2D; 66 | } 67 | 68 | public void SetProperties(Texture colorTexture, Texture positionMap, Texture normalMap, Texture uvMap) 69 | { 70 | if (!_effect) return; 71 | 72 | if (normalMap) 73 | { 74 | _effect.SetTexture("_PositionMap", positionMap); 75 | if (colorTexture != null) _effect.SetTexture("_ColorTexture", colorTexture); 76 | _effect.SetTexture("_NormalMap", normalMap); 77 | _effect.SetTexture("_UVMap", uvMap); 78 | } 79 | 80 | _effect.SetUInt(RateID, rate); 81 | _effect.SetFloat(WidthID, width); 82 | _effect.SetFloat(AlphaID, alpha); 83 | _effect.SetAnimationCurve(SizeDecayCurveID, sizeDecayCurve); 84 | _effect.SetFloat(SizeMinID, sizeMin); 85 | _effect.SetFloat(SizeMaxID, sizeMax); 86 | _effect.SetFloat(LifeTimeMinID, lifeTimeMin); 87 | _effect.SetFloat(LifeTimeMaxID, lifeTimeMax); 88 | _effect.SetFloat(EmissionIntensityID, emissionIntensity); 89 | _effect.SetFloat(RotateDegreeID, rotateDegree); 90 | _effect.SetFloat(OffsetID, offset); 91 | _effect.SetBool(UseTextureID, useTexture); 92 | _effect.SetTexture(SparkleTextureID, sparkleTexture); 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Documentation/MeshSparklyEffect.md: -------------------------------------------------------------------------------- 1 | # Documentation for MeshSparklyEffect 2 | 3 | [日本語版](./MeshSparklyEffect_ja.md) 4 | 5 | ## Usage 6 | 7 | 0. Make sure the Universal Render Pipeline Asset is set correctly in the Scriptable Render Pipeline Settings in the Graphics section of Project Settings. 8 | 1. Add MeshSparklyEffect.cs to GameObject 9 | 1. With the error "The SkinnedMeshRenderer is missing.", a Switch MeshFilter button and a property to specify the Skinned Mesh Renderer will appear. 10 | 1. By specifying Skinned Mesh Renderer here, parameters to adjust the effect will appear (MeshFilter can also be specified by pressing the Switch MeshFilter Mode button). 11 | 1. When the parameter to adjust the effect appears in the inspector of MeshSparklyEffect, you can change the appearance of the effect by adjusting each property. 12 | 13 | ## Description of inspector properties 14 | 15 | ![Inspector window](./Images/inspector.png) 16 | 17 | ### Switch MeshFilter/SkinnedMeshRenderer Mode button 18 | 19 | By pressing this button, you can switch between using Skinned Mesh Renderer and MeshFilter. 20 | 21 | If the Mesh to be switched to is not registered, an error will be displayed at the top of the inspector, and it will return to the initial state where each parameter is hidden. 22 | 23 | ### Target SkinnedMeshRenderer/MeshFilter 24 | 25 | Specify the mesh to be targeted. 26 | 27 | The position of the particle is determined based on the vertex information of the mesh specified here. 28 | 29 | However, this specification alone does not track the Mesh Transform, so it is necessary to add a Constraint to the GameObject with the Visual Effect that will be added to the lower layer (for example, in the sample scene called MeshFilter, a Parent Constraint is used.) 30 | 31 | ### Color Texture 32 | 33 | A texture used to add color to particles. 34 | 35 | The UVs of the specified mesh are used to reflect the color on the texture to the particles, so if the texture used on the specified mesh is used, the color corresponding to the vertex position where the particles are emitted will be reflected. 36 | 37 | ### Rate 38 | 39 | The frequency at which particles are emitted. 40 | 41 | The higher this value, the more particles are emitted in a short period of time. 42 | 43 | ### Alpha 44 | 45 | Alpha value of the particle. 46 | 47 | ### Size Decay Curve 48 | 49 | An animation curve that specifies how the size of the particles will change depending on the Life Time. 50 | 51 | The actual size of the particle is determined by multiplying a random value within the range specified by Size Min-Max by the Size Decay Curve. 52 | 53 | ### Size Min-Max 54 | 55 | It specifies a range of particle sizes that are determined randomly, and can be fixed to a unique size by setting Min and Max to the same value. 56 | 57 | The MinMaxSlider can also be used to specify the minimum and maximum values that can be moved by the slider by changing the Low Limit and High Limit. 58 | 59 | ### Life Time Min-Max 60 | 61 | Specifies a range of particle display times that are determined randomly. 62 | 63 | Like Size Min-Max, it can be fixed by setting it to the same value. 64 | 65 | ### Emission Intensity 66 | 67 | Emission intensity of particles. 68 | 69 | ### Rotate Degree 70 | 71 | Specifies the rotation angle of the particle in degrees. 72 | 73 | ### Offset 74 | 75 | Specifies how much the particle's appearance position is shifted from the mesh vertex position toward the normal direction. 76 | 77 | Adjust this value so that the particles do not overlap with the mesh. 78 | 79 | ### Switch Texture/Procedural Mode ボタン 80 | 81 | This button can be used to switch between using cross-shaped procedural particles or textures as particles. 82 | 83 | When you press this button to switch the mode, the parameters that match the current mode will be displayed. 84 | 85 | ### Spike Width (Procedural Mode) 86 | 87 | Specifies the thickness of the spikes of the cross-shaped particles. 88 | 89 | ### Sparkle Texture (Texture Mode) 90 | 91 | Specifies the texture to be used as a particle. 92 | 93 | ### Convert to Map/Mesh ボタン 94 | 95 | The texture generated from the mesh vertex information is displayed in the inspector, and can be returned to the original Mesh display mode by pressing the button again when it says Convert to Mesh. 96 | 97 | ![Convert to Map](./Images/vertex_map.png) 98 | 99 | When the Bake button is pressed, a window will appear to specify the directory where each texture is to be saved, and the file will be saved in the specified location as an EXR file with the combination of the mesh name and the respective map name as the file name. -------------------------------------------------------------------------------- /UIElementsSchema/UnityEditor.VFX.UI.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 8 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo 3DS: 5 229 | Nintendo Switch: 5 230 | PS4: 5 231 | PSP2: 2 232 | Stadia: 5 233 | Standalone: 5 234 | WebGL: 3 235 | Windows Store Apps: 5 236 | XboxOne: 5 237 | iPhone: 2 238 | tvOS: 2 239 | -------------------------------------------------------------------------------- /UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /Assets/MeshSparklyEffect/Editor/SkinnedMeshSparklyEffectInspector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using UIToolkitExtensions; 4 | using UnityEditor; 5 | using UnityEngine; 6 | using UnityEngine.UIElements; 7 | using UnityEditor.UIElements; 8 | 9 | namespace MeshSparklyEffect 10 | { 11 | #if UNITY_EDITOR 12 | [CustomEditor(typeof(SkinnedMeshSparklyEffect))] 13 | public class SkinnedMeshSparklyEffectInspector : UnityEditor.Editor 14 | { 15 | [SerializeField] private VisualTreeAsset skinnedMeshSparklyEffectInspectorUXML; 16 | 17 | private const string NullReferenceErrorMessage = " is missing."; 18 | 19 | private static readonly string NotReadableErrorMessage = 20 | " is not readable. Please make this asset readable in the import settings."; 21 | 22 | private const string UnknownErrorMessage = "Error: "; 23 | 24 | private const string ModeButtonTextOnProceduralMode = "Switch Texture Mode"; 25 | private const string ModeButtonTextOnTextureMode = "Switch Procedural Mode"; 26 | 27 | private const string UndoRecordName = "Changed SkinnedMeshSparklyEffect convert mode"; 28 | 29 | private const float Margin = 10.0f; 30 | 31 | private VisualElement _root; 32 | private HelpBox _errorMessageBox; 33 | private VisualElement _parametersRoot; 34 | private VisualElement _sharedParameters; 35 | private Button _modeSwitchButton; 36 | private VisualElement _proceduralModeParameter; 37 | private VisualElement _textureModeParameter; 38 | private MinMaxSliderWithValue _sizeMinMaxProp; 39 | private MinMaxSliderWithValue _lifeTimeMinMaxProp; 40 | private Button _convertButton; 41 | 42 | public override VisualElement CreateInspectorGUI() 43 | { 44 | var meshSparklyEffect = target as SkinnedMeshSparklyEffect; 45 | var sparkleVFX = meshSparklyEffect.sparkleVFX; 46 | 47 | _root = Resources.Load("SkinnedMeshSparklyEffectInspector").CloneTree(); 48 | _root.name = "mesh-sparkly-effect"; 49 | _root.Bind(serializedObject); 50 | 51 | // Error message box 52 | _errorMessageBox = new HelpBox("", HelpBoxMessageType.Error); 53 | _errorMessageBox.style.marginTop = Margin; 54 | _errorMessageBox.style.marginBottom = Margin; 55 | 56 | // Mesh parameters 57 | var targetMeshProp = _root.Q("skinned-mesh-renderer"); 58 | targetMeshProp.RegisterValueChangedCallback(_ => OnChangedTargetMesh()); 59 | targetMeshProp.RegisterCallback(_ => OnChangedTargetMesh()); 60 | 61 | // Parameters root 62 | _parametersRoot = _root.Q("parameters-root"); 63 | _sizeMinMaxProp = _root.Q("size-min-max"); 64 | _sizeMinMaxProp.RegisterValueChangedCallback((range, limit) => 65 | { 66 | Undo.RecordObject(meshSparklyEffect, "Changed MeshSparklyEffect Slider"); 67 | 68 | sparkleVFX.sizeMin = range.x; 69 | sparkleVFX.sizeMax = range.y; 70 | sparkleVFX.sizeLowLimit = limit.x; 71 | sparkleVFX.sizeHighLimit = limit.y; 72 | }); 73 | 74 | _lifeTimeMinMaxProp = _root.Q("life-time-min-max"); 75 | _lifeTimeMinMaxProp.RegisterValueChangedCallback((range, limit) => 76 | { 77 | Undo.RecordObject(meshSparklyEffect, UndoRecordName); 78 | 79 | sparkleVFX.lifeTimeMin = range.x; 80 | sparkleVFX.lifeTimeMax = range.y; 81 | sparkleVFX.lifeTimeLowLimit = limit.x; 82 | sparkleVFX.lifeTimeHighLimit = limit.y; 83 | }); 84 | 85 | ApplyMinMaxValues(); 86 | Undo.undoRedoPerformed += ApplyMinMaxValues; 87 | 88 | // Sparkle parameters 89 | _modeSwitchButton = _root.Q