├── Library
├── BuildPlayer.prefs
├── AssetImportState
├── guidmapper
├── ScriptMapper
├── expandedItems
├── assetDatabase3
├── AnnotationManager
├── AssetServerCacheV3
├── AssetVersioning.db
├── MonoManager.asset
├── BuildSettings.asset
├── ProjectSettings.asset
├── EditorUserSettings.asset
├── InspectorExpandedItems.asset
├── EditorUserBuildSettings.asset
└── metadata
│ ├── 10
│ └── 10189948b2cb148d3aa50628ea93d3ff
│ ├── 13
│ ├── 1308cc5a8d6cd48ad8386367ad4d9720
│ └── 13106d05a641541c185601f0dabe9e6b
│ ├── 15
│ └── 153c3605fb5a44f4b9dc00e9231b9b83
│ ├── 19
│ └── 19e47d3ee32f4408dbac426e8e0fa014
│ ├── 22
│ └── 2254ce149f91f4991bb95e024265d77b
│ ├── 25
│ └── 251c80fe0a45c4ec6bbbe458d1111611
│ ├── 27
│ └── 2730fe584b3984be0848b50d8b7db110
│ ├── 28
│ └── 280a1560a6a5445d4a01886469bcd72a
│ ├── 30
│ ├── 303adadff168547f9965673c1a6114a1
│ └── 30b36243d25df455dbf8efd36ea2e43e
│ ├── 31
│ ├── 31a95d6f93612481788f986db7434684
│ └── 31c4d339795484d3196fbc3137538564
│ ├── 32
│ └── 328905abb06434c209df68d9e14af3f5
│ ├── 33
│ ├── 3312e124bffa146898a43279bd36c8e5
│ └── 33bbce25106c048c3879a93a3f72ca9c
│ ├── 34
│ ├── 34b8059e96ebb45e2b9f6cee78290b15
│ └── 34fde5bb7a65c4da8b90df7351cd4cea
│ ├── 37
│ └── 3781f622e88f04d0ebf0133a6ff9bbd2
│ ├── 38
│ └── 3883bc6da1b3049f385459c126eabe6e
│ ├── 44
│ └── 440b9c1ae315949bc95940220249086e
│ ├── 46
│ └── 46059fb6d685b4262949a26727b829ea
│ ├── 49
│ └── 4948368c667c548e194e6a802b8fe363
│ ├── 50
│ └── 5056893a0f9994973b902852982c4239
│ ├── 51
│ └── 5174b11607c864cf78a6254d9a587fa7
│ ├── 52
│ ├── 52007d9ba223c483b85c8fb1f2ec667d
│ └── 52b7465d377534051b267ea52522c718
│ ├── 53
│ └── 53d932981d003408f88599ed19a23654
│ ├── 54
│ └── 54922bac112be4a688ff1f87f5f96f56
│ ├── 55
│ ├── 552dba19f1f9e4a6d9ca3eab99bb726f
│ └── 55fc5c2d203ea45dd850a204e62cc50a
│ ├── 58
│ └── 589d4c38add154a0abe1f938d3eb1172
│ ├── 62
│ ├── 62e983335fad74680a3b1073cc104efa
│ └── 62fb469e082134774a9fe49e23759e68
│ ├── 65
│ ├── 6570607b36b814fbabc3f387468254e3
│ └── 65a690f546a0a43af8e80307a6556683
│ ├── 67
│ └── 6743f86ad87fc4b7bbaa7354c4a57772
│ ├── 69
│ └── 69f0748deba35413b99d217a623b96c5
│ ├── 70
│ └── 70d8da223a0674143939045c5a0cb47e
│ ├── 71
│ ├── 7161921fe76784ad0bac1194195555d4
│ └── 71ae6439f36974150844b64df9ec280d
│ ├── 72
│ └── 726f22e8de5dd4278bddaef425885b75
│ ├── 77
│ └── 77ca8637d8c6e41149a91fb3ffeefb01
│ ├── 78
│ └── 78e277c571a654ccfb3058f6c872e39f
│ ├── 80
│ ├── 80546971605724dd3bebe210ceaef876
│ └── 8067dc941976a438bbbd6f9fce7a1221
│ ├── 82
│ └── 8214459064fe7467d9e2c389847cb19c
│ ├── 83
│ ├── 830b9d58fc2374307ab195c779a3b0fa
│ └── 83c9734f56b6d44469719330c3b4e5b4
│ ├── 85
│ ├── 857fe0b9a726340a184f0c40cd6b5037
│ └── 85804baa809594d4e8910b733d2c3a07
│ ├── 89
│ ├── 89216cbfd5d0a43bb9667e6d69f24804
│ └── 89af0b4e9c7e74ea4963a83aca3ccd07
│ ├── 90
│ └── 90f87c63fdce843cfa78a0ae3ee23964
│ ├── 92
│ └── 92beda72284014a12b003d00a4c3aa2d
│ ├── 93
│ └── 93e07c19ee43049a38a2e9a4e9e344c7
│ ├── 94
│ └── 94bba2c79807c44eda4354ca726cb0d5
│ ├── 95
│ └── 95f04007463ea46b9bb03d8352bbd2a9
│ ├── 96
│ └── 9607d5f63a852414492b34b385eb73f8
│ ├── 98
│ ├── 982effeca03804e7b8f7b0c7ae91cc2d
│ ├── 98f4f25baa7854072bd664bd2469dc7c
│ └── 98f5c0b1485764bbdabe405f7598b764
│ ├── 00
│ ├── 00000000000000001000000000000000
│ ├── 00000000000000002000000000000000
│ ├── 00000000000000003000000000000000
│ ├── 00000000000000004000000000000000
│ ├── 00000000000000004100000000000000
│ ├── 00000000000000005000000000000000
│ ├── 00000000000000006000000000000000
│ ├── 00000000000000007000000000000000
│ ├── 00000000000000008000000000000000
│ ├── 00000000000000009000000000000000
│ ├── 0000000000000000a000000000000000
│ ├── 0000000000000000b000000000000000
│ ├── 0000000000000000c000000000000000
│ └── 00f1f025b6b894b3f9f79a91bc101a57
│ ├── 01
│ └── 01b2c0506f2044e12be669f59362b762
│ ├── 05
│ └── 05be793663e1b4a19b3f1da85f66e7c4
│ ├── 06
│ └── 06930dd829aa0438b8361ed04493ba62
│ ├── 08
│ └── 08e265f5ceedb408286742b52287a7b4
│ ├── 0b
│ └── 0b8cf8e7e40a54b58b70427cbcb25d2d
│ ├── 0e
│ ├── 0e3af906e19074615885c897049e1dc9
│ └── 0e6c28112fb2b45cda2d7789bda352d3
│ ├── 0f
│ └── 0fc720dd6d32e4c5893d86debaf237de
│ ├── 1a
│ └── 1ae1ad2207cb34d68a4596ffaf409343
│ ├── 1b
│ └── 1b675d92f36ae4e59a5d771daa2d1356
│ ├── 1d
│ └── 1d58697b9d766447694e225706ec17a4
│ ├── 1f
│ └── 1fffe0aef82474143a728579046f0c06
│ ├── 2c
│ └── 2c3ff33ea9ade45debc20c8b6a8208d5
│ ├── 2e
│ └── 2e8bcc7d4093e4eb685749d6f817f4ba
│ ├── 3a
│ └── 3a7d57ef5a5b3466fa114e4bac426e19
│ ├── 3c
│ └── 3ca572e45fd434518966c114fcc75285
│ ├── 3e
│ ├── 3e59d871e200141af8af71de38e99b82
│ └── 3e63a40bd84bb41fd8933e214f571de9
│ ├── 4c
│ ├── 4cce52cd2089a47d39f2d71401144379
│ └── 4cdc9e11696c94afab53b9a331e80f3d
│ ├── 4d
│ ├── 4dc706cf433714372998b2ba48b5a476
│ └── 4df6c4d982af14660acdf7c0c077c77d
│ ├── 5c
│ ├── 5c8fa5eb2adbc40138012ad7f519555c
│ └── 5cbacebb5b19d4c0a9fc4d0f8d6120d8
│ ├── 5d
│ └── 5dba9aeb1b9cd4b0b99e7ef8a4d737f7
│ ├── 5e
│ └── 5e83e089bf9274e5aac92e6440f8d9af
│ ├── 5f
│ └── 5fe001350c19f40e881a5ca9b32b4fa5
│ ├── 6b
│ └── 6b534865c94c146ba9989270de6d23e3
│ ├── 6e
│ └── 6e43b14dd03894942a25504500de71d7
│ ├── 7f
│ └── 7fc032a5b4caf4980adf9bb1d7c291bc
│ ├── 8a
│ └── 8aa1ecef7a0fa491197fc860f98b2cac
│ ├── 8b
│ └── 8bbbb524c12c643b397638156234d45f
│ ├── 8e
│ ├── 8e3c23c0e61c44237bb6406ff882d278
│ └── 8ea776cff9efd4eed9c51e21c2c5780c
│ ├── 8f
│ └── 8f78e896653374ff089a09998489a12a
│ ├── 9c
│ └── 9c0cd22eb9179451ebdd4561b5ab72f9
│ ├── 9d
│ └── 9dd5663d78ac04a219dc22c3f04b1644
│ ├── a0
│ └── a087cdd23ebe04f7dbe621f3a1c0a696
│ ├── a2
│ └── a257da9a3fc6d47708189b70187da492
│ ├── a3
│ └── a35ab55216fc7463f874bcea50829dcb
│ ├── a4
│ ├── a423b0b7339474022a66f6f5b648a732
│ └── a4e63045572b6496d9aee003049f2f80
│ ├── a5
│ └── a572c7c97c84241df9419ba418cd0ed2
│ ├── a7
│ ├── a76c1526a5d3644c4ac5ee8d9f5b8fe9
│ └── a7e1cda58c8684a1399f7dc2d1503039
│ ├── ab
│ └── aba6533746434446481d5fa0179addc6
│ ├── ae
│ ├── aea67b02062eb4318a63d141ce610d57
│ └── aeeb0148f350a4330bed69b9d15a40df
│ ├── b1
│ └── b1e29ddadcfc143c7a2581b5b89e4658
│ ├── b3
│ └── b359ee5dd2e5d4e64b32585f59ff77dc
│ ├── b4
│ └── b479aff1a56f74c7bb741baa22191458
│ ├── b5
│ └── b5b6942baa5a44214acf3305b232a4c2
│ ├── bd
│ └── bd2cd6fbbaa7449fea7b1de281559bce
│ ├── bf
│ └── bf69e72efa04a441d90b5b0cb9b9bc55
│ ├── c2
│ └── c213ea7dc85db4118871a24c4c0f2ea2
│ ├── c3
│ ├── c38b1befba7684a538f1181019a176fa
│ └── c3a025f68d8464065866a63d7ec8df7e
│ ├── c4
│ └── c4b8ed3b4f0e34844a2d594293add9f7
│ ├── c6
│ └── c6fc6d30939914409a2101e8fddef9cb
│ ├── c9
│ └── c91ea4f9c1fdb46db80d4e12e900b961
│ ├── ca
│ ├── ca0cecf2de06a48e7ac0427a3d3d01ff
│ └── ca3aaef564f944b2bbb075ea68df443a
│ ├── cc
│ ├── ccd1c500f26684075afd0a042fd5801f
│ └── ccd280f2d7e5a493b928542962e1fc0a
│ ├── cd
│ └── cdb6bb67c299f41d48f355428fc963a5
│ ├── ce
│ └── ce174e0f1ac4a4e4fbaa4a615ad448e9
│ ├── cf
│ ├── cf71faea665f94e98acf1dedadb55800
│ └── cfbeb884b3d2a4af4a05b6ee044ed551
│ ├── d4
│ └── d4c0cd8fb14d34bc89c885641f0d1f9b
│ ├── d5
│ └── d53a4bb946b3f4c4da6f19a4b14b6a57
│ ├── d6
│ ├── d61ac50f6c9d94afda757799bfdd704e
│ └── d6a536bf16ab442efb4ee223b254a83a
│ ├── d9
│ └── d9787f9735b5640929f27e983396e14e
│ ├── da
│ └── da82606dc7c5d43488a281b866da9d2d
│ ├── dc
│ └── dcb01c0ab73de4296aba89f2090e472a
│ ├── de
│ ├── de552a45850a747469c06da21a841fd8
│ └── ded3d3ec0601e4069acf9b4768ec0da2
│ ├── df
│ └── df31f07fb6a2741078de4085acdaecac
│ ├── e2
│ ├── e24216cdc18d54b6f8bd52f5d3d3e0c1
│ └── e2ff54e23ffc6422fbc554ae0de5adde
│ ├── e3
│ ├── e318f9117c68049a6862ea3c26787327
│ └── e3c28eceebce94ea4a913d2e116b3ae4
│ ├── e4
│ ├── e46256580da6e49029ad39c943862d3b
│ └── e4f12f2a7e2564219af77e13f9bf69b7
│ ├── e5
│ ├── e51291d2e5a214c108a03725ec86f320
│ └── e529eedd331a440d5a8505dcef244f7f
│ ├── e6
│ └── e69d7735a75f143dd8d1efee1cc39a38
│ ├── e9
│ └── e9ad76f22d80e405cae11702061b02be
│ ├── eb
│ └── eb42110892dc14b16a8d855260dd4ebf
│ ├── ee
│ └── ee7237ae13e814028a0708491908f18e
│ ├── f1
│ └── f12e41fffe2294bdcb692bf381a5655b
│ ├── f2
│ └── f22825362024b4939a59ef0f50cff865
│ ├── f5
│ └── f5617e0869d094ec297a77dcd175ee5f
│ ├── f6
│ └── f68071dd43dd042a0ba36c6658cd0bdc
│ ├── f7
│ └── f738e11c79ea942fab88f1066fe70cc6
│ ├── fa
│ └── fa5aaaf50a472453aa0251be2cd91c8e
│ ├── fc
│ └── fcc1232c6469d42589abd82a1f34ee21
│ └── ff
│ ├── ff3b94dd3b9e84ef5a43f8e4817a4862
│ └── ff8ead7a7d3e844e1927735d37889958
├── Assets
├── Scene1.unity
├── Plugins
│ └── Android
│ │ ├── libn3.so
│ │ ├── res
│ │ ├── xml
│ │ │ └── voice_commands.xml
│ │ ├── raw
│ │ │ ├── red.png
│ │ │ └── blue.png
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── values
│ │ │ └── strings.xml
│ │ └── layout
│ │ │ └── marker_tracking.xml
│ │ ├── libn3_apps.so
│ │ ├── n3-unity.jar
│ │ ├── libn3_marker.so
│ │ ├── opencv-sdk.jar
│ │ ├── libopencv_java.so
│ │ ├── libnative_camera_r2.2.0.so
│ │ ├── libnative_camera_r2.3.3.so
│ │ ├── libnative_camera_r3.0.1.so
│ │ ├── libnative_camera_r4.0.0.so
│ │ ├── libnative_camera_r4.0.3.so
│ │ ├── libnative_camera_r4.1.1.so
│ │ ├── libnative_camera_r4.2.0.so
│ │ └── AndroidManifest.xml
├── Resources
│ ├── MMDEngine.cs
│ ├── toon
│ │ ├── toon00.bmp
│ │ ├── toon01.bmp
│ │ ├── toon02.bmp
│ │ ├── toon03.bmp
│ │ ├── toon04.bmp
│ │ ├── toon05.bmp
│ │ ├── toon06.bmp
│ │ ├── toon07.bmp
│ │ ├── toon08.bmp
│ │ ├── toon09.bmp
│ │ └── toon10.bmp
│ ├── HalfLambert.shader
│ ├── MMDSkinsScript.cs
│ ├── PMDMaterial
│ │ ├── Toons
│ │ │ └── toon.png
│ │ ├── PMD Material.mat
│ │ ├── PMDMaterials.unitypackage
│ │ ├── PMD Material Transparent.mat
│ │ ├── PMD Material with Outline.mat
│ │ ├── PMD Material with Outline Transparent.mat
│ │ ├── README.md
│ │ ├── Shaders
│ │ │ ├── MeshPmdMaterialVertFrag.cginc
│ │ │ ├── MeshPmdMaterial.shader
│ │ │ ├── MeshPmdMaterialOutline.shader
│ │ │ ├── MeshPmdMaterial-Trans.shader
│ │ │ ├── MeshPmdMaterialOutline-Trans.shader
│ │ │ └── MeshPmdMaterialSurface.cginc
│ │ └── LICENSE
│ ├── ExpressionManagerScript.cs
│ └── IK
│ │ └── CCDIKSolver.cs
├── model
│ ├── Miku_Hatsune.asset
│ ├── Miku_Hatsune.pmd
│ ├── Miku_Hatsune.prefab
│ ├── Miku_Hatsune_Ver2.pmd
│ ├── Physics
│ │ ├── Miku_Hatsune_rarm_L.asset
│ │ ├── Miku_Hatsune_rarm_R.asset
│ │ ├── Miku_Hatsune_rchin.asset
│ │ ├── Miku_Hatsune_rhead.asset
│ │ ├── Miku_Hatsune_rneck.asset
│ │ ├── Miku_Hatsune_relbow_L.asset
│ │ ├── Miku_Hatsune_relbow_R.asset
│ │ ├── Miku_Hatsune_rf_hair1.asset
│ │ ├── Miku_Hatsune_rf_hair2.asset
│ │ ├── Miku_Hatsune_rf_hair3.asset
│ │ ├── Miku_Hatsune_rhair1_L.asset
│ │ ├── Miku_Hatsune_rhair1_R.asset
│ │ ├── Miku_Hatsune_rhair2_L.asset
│ │ ├── Miku_Hatsune_rhair2_R.asset
│ │ ├── Miku_Hatsune_rhair3_L.asset
│ │ ├── Miku_Hatsune_rhair3_R.asset
│ │ ├── Miku_Hatsune_rhair4_L.asset
│ │ ├── Miku_Hatsune_rhair4_R.asset
│ │ ├── Miku_Hatsune_rhair5_L.asset
│ │ ├── Miku_Hatsune_rhair5_R.asset
│ │ ├── Miku_Hatsune_rhair6_L.asset
│ │ ├── Miku_Hatsune_rhair6_R.asset
│ │ ├── Miku_Hatsune_rknee_L.asset
│ │ ├── Miku_Hatsune_rknee_R.asset
│ │ ├── Miku_Hatsune_rl_body.asset
│ │ ├── Miku_Hatsune_rleg1_L.asset
│ │ ├── Miku_Hatsune_rleg1_R.asset
│ │ ├── Miku_Hatsune_rleg2_L.asset
│ │ ├── Miku_Hatsune_rleg2_R.asset
│ │ ├── Miku_Hatsune_ru_body1.asset
│ │ ├── Miku_Hatsune_ru_body2.asset
│ │ ├── Miku_Hatsune_ru_body3.asset
│ │ ├── Miku_Hatsune_ru_body4.asset
│ │ ├── Miku_Hatsune_rb_skirt2_L.asset
│ │ ├── Miku_Hatsune_rb_skirt2_R.asset
│ │ ├── Miku_Hatsune_rb_skirt_L.asset
│ │ ├── Miku_Hatsune_rb_skirt_R.asset
│ │ ├── Miku_Hatsune_rf_skirt2_L.asset
│ │ ├── Miku_Hatsune_rf_skirt2_R.asset
│ │ ├── Miku_Hatsune_rf_skirt_L.asset
│ │ ├── Miku_Hatsune_rf_skirt_R.asset
│ │ ├── Miku_Hatsune_rnecktie1.asset
│ │ ├── Miku_Hatsune_rnecktie2.asset
│ │ ├── Miku_Hatsune_rnecktie3.asset
│ │ └── Miku_Hatsune_rw_accessory.asset
│ └── Materials
│ │ ├── Miku_Hatsune_material0.asset
│ │ ├── Miku_Hatsune_material1.asset
│ │ ├── Miku_Hatsune_material2.asset
│ │ ├── Miku_Hatsune_material3.asset
│ │ ├── Miku_Hatsune_material4.asset
│ │ ├── Miku_Hatsune_material5.asset
│ │ ├── Miku_Hatsune_material6.asset
│ │ ├── Miku_Hatsune_material7.asset
│ │ ├── Miku_Hatsune_material8.asset
│ │ ├── Miku_Hatsune_material9.asset
│ │ ├── Miku_Hatsune_material10.asset
│ │ ├── Miku_Hatsune_material11.asset
│ │ ├── Miku_Hatsune_material12.asset
│ │ ├── Miku_Hatsune_material13.asset
│ │ ├── Miku_Hatsune_material14.asset
│ │ ├── Miku_Hatsune_material15.asset
│ │ └── Miku_Hatsune_material16.asset
├── motion
│ ├── clovercluba.vmd
│ └── cloverclubb.vmd
├── MMDLoader
│ ├── LoadedWindow.cs
│ ├── Private
│ │ ├── AvatarSettingScript.cs
│ │ ├── ComputeSkin.cs
│ │ ├── VMDLoaderScript.cs
│ │ ├── MMDMathf.cs
│ │ ├── PMDLoaderScript.cs
│ │ └── MMDFormat.cs
│ ├── VMDLoaderWindow.cs
│ └── PMDLoaderWindow.cs
├── XFileImporter
│ ├── XFileImporterWindow.cs
│ └── Private
│ │ ├── XFileImporter.cs
│ │ ├── XFileConverter.cs
│ │ └── XFileFormat.cs
└── Scripts
│ ├── Miku.cs
│ └── MyCamera.cs
├── ProjectSettings
├── TagManager.asset
├── TimeManager.asset
├── AudioManager.asset
├── EditorSettings.asset
├── InputManager.asset
├── NavMeshLayers.asset
├── NetworkManager.asset
├── DynamicsManager.asset
├── ProjectSettings.asset
├── QualitySettings.asset
└── EditorBuildSettings.asset
└── .gitignore
/Library/BuildPlayer.prefs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Library/AssetImportState:
--------------------------------------------------------------------------------
1 | 13;0;-1
--------------------------------------------------------------------------------
/Library/guidmapper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/guidmapper
--------------------------------------------------------------------------------
/Assets/Scene1.unity:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Scene1.unity
--------------------------------------------------------------------------------
/Library/ScriptMapper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/ScriptMapper
--------------------------------------------------------------------------------
/Library/expandedItems:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/expandedItems
--------------------------------------------------------------------------------
/Library/assetDatabase3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/assetDatabase3
--------------------------------------------------------------------------------
/Library/AnnotationManager:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/AnnotationManager
--------------------------------------------------------------------------------
/Library/AssetServerCacheV3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/AssetServerCacheV3
--------------------------------------------------------------------------------
/Library/AssetVersioning.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/AssetVersioning.db
--------------------------------------------------------------------------------
/Library/MonoManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/MonoManager.asset
--------------------------------------------------------------------------------
/Library/BuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/BuildSettings.asset
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libn3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libn3.so
--------------------------------------------------------------------------------
/Assets/Resources/MMDEngine.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/MMDEngine.cs
--------------------------------------------------------------------------------
/Assets/model/Miku_Hatsune.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Miku_Hatsune.asset
--------------------------------------------------------------------------------
/Assets/model/Miku_Hatsune.pmd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Miku_Hatsune.pmd
--------------------------------------------------------------------------------
/Assets/motion/clovercluba.vmd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/motion/clovercluba.vmd
--------------------------------------------------------------------------------
/Assets/motion/cloverclubb.vmd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/motion/cloverclubb.vmd
--------------------------------------------------------------------------------
/Library/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/ProjectSettings.asset
--------------------------------------------------------------------------------
/Assets/MMDLoader/LoadedWindow.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/MMDLoader/LoadedWindow.cs
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/xml/voice_commands.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon00.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon00.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon01.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon01.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon02.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon02.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon03.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon03.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon04.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon04.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon05.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon05.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon06.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon06.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon07.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon07.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon08.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon08.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon09.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon09.bmp
--------------------------------------------------------------------------------
/Assets/Resources/toon/toon10.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/toon/toon10.bmp
--------------------------------------------------------------------------------
/Assets/model/Miku_Hatsune.prefab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Miku_Hatsune.prefab
--------------------------------------------------------------------------------
/Library/EditorUserSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/EditorUserSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/TagManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/TimeManager.asset
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libn3_apps.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libn3_apps.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/n3-unity.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/n3-unity.jar
--------------------------------------------------------------------------------
/Assets/Resources/HalfLambert.shader:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/HalfLambert.shader
--------------------------------------------------------------------------------
/Assets/Resources/MMDSkinsScript.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/MMDSkinsScript.cs
--------------------------------------------------------------------------------
/Assets/model/Miku_Hatsune_Ver2.pmd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Miku_Hatsune_Ver2.pmd
--------------------------------------------------------------------------------
/Library/InspectorExpandedItems.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/InspectorExpandedItems.asset
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/AudioManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/EditorSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/InputManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshLayers.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/NavMeshLayers.asset
--------------------------------------------------------------------------------
/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/NetworkManager.asset
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libn3_marker.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libn3_marker.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/opencv-sdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/opencv-sdk.jar
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/raw/red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/res/raw/red.png
--------------------------------------------------------------------------------
/Library/EditorUserBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/EditorUserBuildSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/DynamicsManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/ProjectSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/QualitySettings.asset
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libopencv_java.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libopencv_java.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/raw/blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/res/raw/blue.png
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/ProjectSettings/EditorBuildSettings.asset
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Toons/toon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/Toons/toon.png
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/res/drawable/icon.png
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/PMD Material.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/PMD Material.mat
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rarm_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rarm_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rarm_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rarm_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rchin.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rchin.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhead.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhead.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rneck.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rneck.asset
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/AvatarSettingScript.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/MMDLoader/Private/AvatarSettingScript.cs
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_relbow_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_relbow_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_relbow_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_relbow_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_hair1.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_hair1.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_hair2.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_hair2.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_hair3.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_hair3.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair1_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair1_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair1_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair1_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair2_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair2_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair2_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair2_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair3_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair3_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair3_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair3_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair4_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair4_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair4_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair4_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair5_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair5_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair5_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair5_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair6_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair6_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rhair6_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rhair6_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rknee_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rknee_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rknee_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rknee_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rl_body.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rl_body.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rleg1_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rleg1_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rleg1_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rleg1_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rleg2_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rleg2_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rleg2_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rleg2_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_ru_body1.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_ru_body1.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_ru_body2.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_ru_body2.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_ru_body3.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_ru_body3.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_ru_body4.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_ru_body4.asset
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r2.2.0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r2.2.0.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r2.3.3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r2.3.3.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r3.0.1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r3.0.1.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r4.0.0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r4.0.0.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r4.0.3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r4.0.3.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r4.1.1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r4.1.1.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libnative_camera_r4.2.0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Plugins/Android/libnative_camera_r4.2.0.so
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material0.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material0.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material1.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material1.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material2.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material2.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material3.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material3.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material4.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material4.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material5.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material5.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material6.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material6.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material7.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material7.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material8.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material8.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material9.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material9.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rb_skirt2_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rb_skirt2_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rb_skirt2_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rb_skirt2_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rb_skirt_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rb_skirt_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rb_skirt_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rb_skirt_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_skirt2_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_skirt2_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_skirt2_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_skirt2_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_skirt_L.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_skirt_L.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rf_skirt_R.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rf_skirt_R.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rnecktie1.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rnecktie1.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rnecktie2.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rnecktie2.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rnecktie3.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rnecktie3.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material10.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material10.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material11.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material11.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material12.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material12.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material13.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material13.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material14.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material14.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material15.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material15.asset
--------------------------------------------------------------------------------
/Assets/model/Materials/Miku_Hatsune_material16.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Materials/Miku_Hatsune_material16.asset
--------------------------------------------------------------------------------
/Assets/model/Physics/Miku_Hatsune_rw_accessory.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/model/Physics/Miku_Hatsune_rw_accessory.asset
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000001000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000001000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000002000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000002000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000003000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000003000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000004000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000004000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000004100000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000004100000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000005000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000005000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000006000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000006000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000007000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000007000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000008000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000008000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000009000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00000000000000009000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000a000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/0000000000000000a000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000b000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/0000000000000000b000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000c000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/0000000000000000c000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00f1f025b6b894b3f9f79a91bc101a57:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/00/00f1f025b6b894b3f9f79a91bc101a57
--------------------------------------------------------------------------------
/Library/metadata/01/01b2c0506f2044e12be669f59362b762:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/01/01b2c0506f2044e12be669f59362b762
--------------------------------------------------------------------------------
/Library/metadata/05/05be793663e1b4a19b3f1da85f66e7c4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/05/05be793663e1b4a19b3f1da85f66e7c4
--------------------------------------------------------------------------------
/Library/metadata/06/06930dd829aa0438b8361ed04493ba62:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/06/06930dd829aa0438b8361ed04493ba62
--------------------------------------------------------------------------------
/Library/metadata/08/08e265f5ceedb408286742b52287a7b4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/08/08e265f5ceedb408286742b52287a7b4
--------------------------------------------------------------------------------
/Library/metadata/0b/0b8cf8e7e40a54b58b70427cbcb25d2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/0b/0b8cf8e7e40a54b58b70427cbcb25d2d
--------------------------------------------------------------------------------
/Library/metadata/0e/0e3af906e19074615885c897049e1dc9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/0e/0e3af906e19074615885c897049e1dc9
--------------------------------------------------------------------------------
/Library/metadata/0e/0e6c28112fb2b45cda2d7789bda352d3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/0e/0e6c28112fb2b45cda2d7789bda352d3
--------------------------------------------------------------------------------
/Library/metadata/0f/0fc720dd6d32e4c5893d86debaf237de:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/0f/0fc720dd6d32e4c5893d86debaf237de
--------------------------------------------------------------------------------
/Library/metadata/10/10189948b2cb148d3aa50628ea93d3ff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/10/10189948b2cb148d3aa50628ea93d3ff
--------------------------------------------------------------------------------
/Library/metadata/13/1308cc5a8d6cd48ad8386367ad4d9720:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/13/1308cc5a8d6cd48ad8386367ad4d9720
--------------------------------------------------------------------------------
/Library/metadata/13/13106d05a641541c185601f0dabe9e6b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/13/13106d05a641541c185601f0dabe9e6b
--------------------------------------------------------------------------------
/Library/metadata/15/153c3605fb5a44f4b9dc00e9231b9b83:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/15/153c3605fb5a44f4b9dc00e9231b9b83
--------------------------------------------------------------------------------
/Library/metadata/19/19e47d3ee32f4408dbac426e8e0fa014:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/19/19e47d3ee32f4408dbac426e8e0fa014
--------------------------------------------------------------------------------
/Library/metadata/1a/1ae1ad2207cb34d68a4596ffaf409343:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/1a/1ae1ad2207cb34d68a4596ffaf409343
--------------------------------------------------------------------------------
/Library/metadata/1b/1b675d92f36ae4e59a5d771daa2d1356:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/1b/1b675d92f36ae4e59a5d771daa2d1356
--------------------------------------------------------------------------------
/Library/metadata/1d/1d58697b9d766447694e225706ec17a4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/1d/1d58697b9d766447694e225706ec17a4
--------------------------------------------------------------------------------
/Library/metadata/1f/1fffe0aef82474143a728579046f0c06:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/1f/1fffe0aef82474143a728579046f0c06
--------------------------------------------------------------------------------
/Library/metadata/22/2254ce149f91f4991bb95e024265d77b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/22/2254ce149f91f4991bb95e024265d77b
--------------------------------------------------------------------------------
/Library/metadata/25/251c80fe0a45c4ec6bbbe458d1111611:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/25/251c80fe0a45c4ec6bbbe458d1111611
--------------------------------------------------------------------------------
/Library/metadata/27/2730fe584b3984be0848b50d8b7db110:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/27/2730fe584b3984be0848b50d8b7db110
--------------------------------------------------------------------------------
/Library/metadata/28/280a1560a6a5445d4a01886469bcd72a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/28/280a1560a6a5445d4a01886469bcd72a
--------------------------------------------------------------------------------
/Library/metadata/2c/2c3ff33ea9ade45debc20c8b6a8208d5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/2c/2c3ff33ea9ade45debc20c8b6a8208d5
--------------------------------------------------------------------------------
/Library/metadata/2e/2e8bcc7d4093e4eb685749d6f817f4ba:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/2e/2e8bcc7d4093e4eb685749d6f817f4ba
--------------------------------------------------------------------------------
/Library/metadata/30/303adadff168547f9965673c1a6114a1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/30/303adadff168547f9965673c1a6114a1
--------------------------------------------------------------------------------
/Library/metadata/30/30b36243d25df455dbf8efd36ea2e43e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/30/30b36243d25df455dbf8efd36ea2e43e
--------------------------------------------------------------------------------
/Library/metadata/31/31a95d6f93612481788f986db7434684:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/31/31a95d6f93612481788f986db7434684
--------------------------------------------------------------------------------
/Library/metadata/31/31c4d339795484d3196fbc3137538564:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/31/31c4d339795484d3196fbc3137538564
--------------------------------------------------------------------------------
/Library/metadata/32/328905abb06434c209df68d9e14af3f5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/32/328905abb06434c209df68d9e14af3f5
--------------------------------------------------------------------------------
/Library/metadata/33/3312e124bffa146898a43279bd36c8e5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/33/3312e124bffa146898a43279bd36c8e5
--------------------------------------------------------------------------------
/Library/metadata/33/33bbce25106c048c3879a93a3f72ca9c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/33/33bbce25106c048c3879a93a3f72ca9c
--------------------------------------------------------------------------------
/Library/metadata/34/34b8059e96ebb45e2b9f6cee78290b15:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/34/34b8059e96ebb45e2b9f6cee78290b15
--------------------------------------------------------------------------------
/Library/metadata/34/34fde5bb7a65c4da8b90df7351cd4cea:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/34/34fde5bb7a65c4da8b90df7351cd4cea
--------------------------------------------------------------------------------
/Library/metadata/37/3781f622e88f04d0ebf0133a6ff9bbd2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/37/3781f622e88f04d0ebf0133a6ff9bbd2
--------------------------------------------------------------------------------
/Library/metadata/38/3883bc6da1b3049f385459c126eabe6e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/38/3883bc6da1b3049f385459c126eabe6e
--------------------------------------------------------------------------------
/Library/metadata/3a/3a7d57ef5a5b3466fa114e4bac426e19:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/3a/3a7d57ef5a5b3466fa114e4bac426e19
--------------------------------------------------------------------------------
/Library/metadata/3c/3ca572e45fd434518966c114fcc75285:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/3c/3ca572e45fd434518966c114fcc75285
--------------------------------------------------------------------------------
/Library/metadata/3e/3e59d871e200141af8af71de38e99b82:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/3e/3e59d871e200141af8af71de38e99b82
--------------------------------------------------------------------------------
/Library/metadata/3e/3e63a40bd84bb41fd8933e214f571de9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/3e/3e63a40bd84bb41fd8933e214f571de9
--------------------------------------------------------------------------------
/Library/metadata/44/440b9c1ae315949bc95940220249086e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/44/440b9c1ae315949bc95940220249086e
--------------------------------------------------------------------------------
/Library/metadata/46/46059fb6d685b4262949a26727b829ea:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/46/46059fb6d685b4262949a26727b829ea
--------------------------------------------------------------------------------
/Library/metadata/49/4948368c667c548e194e6a802b8fe363:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/49/4948368c667c548e194e6a802b8fe363
--------------------------------------------------------------------------------
/Library/metadata/4c/4cce52cd2089a47d39f2d71401144379:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/4c/4cce52cd2089a47d39f2d71401144379
--------------------------------------------------------------------------------
/Library/metadata/4c/4cdc9e11696c94afab53b9a331e80f3d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/4c/4cdc9e11696c94afab53b9a331e80f3d
--------------------------------------------------------------------------------
/Library/metadata/4d/4dc706cf433714372998b2ba48b5a476:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/4d/4dc706cf433714372998b2ba48b5a476
--------------------------------------------------------------------------------
/Library/metadata/4d/4df6c4d982af14660acdf7c0c077c77d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/4d/4df6c4d982af14660acdf7c0c077c77d
--------------------------------------------------------------------------------
/Library/metadata/50/5056893a0f9994973b902852982c4239:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/50/5056893a0f9994973b902852982c4239
--------------------------------------------------------------------------------
/Library/metadata/51/5174b11607c864cf78a6254d9a587fa7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/51/5174b11607c864cf78a6254d9a587fa7
--------------------------------------------------------------------------------
/Library/metadata/52/52007d9ba223c483b85c8fb1f2ec667d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/52/52007d9ba223c483b85c8fb1f2ec667d
--------------------------------------------------------------------------------
/Library/metadata/52/52b7465d377534051b267ea52522c718:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/52/52b7465d377534051b267ea52522c718
--------------------------------------------------------------------------------
/Library/metadata/53/53d932981d003408f88599ed19a23654:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/53/53d932981d003408f88599ed19a23654
--------------------------------------------------------------------------------
/Library/metadata/54/54922bac112be4a688ff1f87f5f96f56:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/54/54922bac112be4a688ff1f87f5f96f56
--------------------------------------------------------------------------------
/Library/metadata/55/552dba19f1f9e4a6d9ca3eab99bb726f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/55/552dba19f1f9e4a6d9ca3eab99bb726f
--------------------------------------------------------------------------------
/Library/metadata/55/55fc5c2d203ea45dd850a204e62cc50a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/55/55fc5c2d203ea45dd850a204e62cc50a
--------------------------------------------------------------------------------
/Library/metadata/58/589d4c38add154a0abe1f938d3eb1172:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/58/589d4c38add154a0abe1f938d3eb1172
--------------------------------------------------------------------------------
/Library/metadata/5c/5c8fa5eb2adbc40138012ad7f519555c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/5c/5c8fa5eb2adbc40138012ad7f519555c
--------------------------------------------------------------------------------
/Library/metadata/5c/5cbacebb5b19d4c0a9fc4d0f8d6120d8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/5c/5cbacebb5b19d4c0a9fc4d0f8d6120d8
--------------------------------------------------------------------------------
/Library/metadata/5d/5dba9aeb1b9cd4b0b99e7ef8a4d737f7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/5d/5dba9aeb1b9cd4b0b99e7ef8a4d737f7
--------------------------------------------------------------------------------
/Library/metadata/5e/5e83e089bf9274e5aac92e6440f8d9af:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/5e/5e83e089bf9274e5aac92e6440f8d9af
--------------------------------------------------------------------------------
/Library/metadata/5f/5fe001350c19f40e881a5ca9b32b4fa5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/5f/5fe001350c19f40e881a5ca9b32b4fa5
--------------------------------------------------------------------------------
/Library/metadata/62/62e983335fad74680a3b1073cc104efa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/62/62e983335fad74680a3b1073cc104efa
--------------------------------------------------------------------------------
/Library/metadata/62/62fb469e082134774a9fe49e23759e68:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/62/62fb469e082134774a9fe49e23759e68
--------------------------------------------------------------------------------
/Library/metadata/65/6570607b36b814fbabc3f387468254e3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/65/6570607b36b814fbabc3f387468254e3
--------------------------------------------------------------------------------
/Library/metadata/65/65a690f546a0a43af8e80307a6556683:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/65/65a690f546a0a43af8e80307a6556683
--------------------------------------------------------------------------------
/Library/metadata/67/6743f86ad87fc4b7bbaa7354c4a57772:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/67/6743f86ad87fc4b7bbaa7354c4a57772
--------------------------------------------------------------------------------
/Library/metadata/69/69f0748deba35413b99d217a623b96c5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/69/69f0748deba35413b99d217a623b96c5
--------------------------------------------------------------------------------
/Library/metadata/6b/6b534865c94c146ba9989270de6d23e3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/6b/6b534865c94c146ba9989270de6d23e3
--------------------------------------------------------------------------------
/Library/metadata/6e/6e43b14dd03894942a25504500de71d7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/6e/6e43b14dd03894942a25504500de71d7
--------------------------------------------------------------------------------
/Library/metadata/70/70d8da223a0674143939045c5a0cb47e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/70/70d8da223a0674143939045c5a0cb47e
--------------------------------------------------------------------------------
/Library/metadata/71/7161921fe76784ad0bac1194195555d4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/71/7161921fe76784ad0bac1194195555d4
--------------------------------------------------------------------------------
/Library/metadata/71/71ae6439f36974150844b64df9ec280d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/71/71ae6439f36974150844b64df9ec280d
--------------------------------------------------------------------------------
/Library/metadata/72/726f22e8de5dd4278bddaef425885b75:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/72/726f22e8de5dd4278bddaef425885b75
--------------------------------------------------------------------------------
/Library/metadata/77/77ca8637d8c6e41149a91fb3ffeefb01:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/77/77ca8637d8c6e41149a91fb3ffeefb01
--------------------------------------------------------------------------------
/Library/metadata/78/78e277c571a654ccfb3058f6c872e39f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/78/78e277c571a654ccfb3058f6c872e39f
--------------------------------------------------------------------------------
/Library/metadata/7f/7fc032a5b4caf4980adf9bb1d7c291bc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/7f/7fc032a5b4caf4980adf9bb1d7c291bc
--------------------------------------------------------------------------------
/Library/metadata/80/80546971605724dd3bebe210ceaef876:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/80/80546971605724dd3bebe210ceaef876
--------------------------------------------------------------------------------
/Library/metadata/80/8067dc941976a438bbbd6f9fce7a1221:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/80/8067dc941976a438bbbd6f9fce7a1221
--------------------------------------------------------------------------------
/Library/metadata/82/8214459064fe7467d9e2c389847cb19c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/82/8214459064fe7467d9e2c389847cb19c
--------------------------------------------------------------------------------
/Library/metadata/83/830b9d58fc2374307ab195c779a3b0fa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/83/830b9d58fc2374307ab195c779a3b0fa
--------------------------------------------------------------------------------
/Library/metadata/83/83c9734f56b6d44469719330c3b4e5b4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/83/83c9734f56b6d44469719330c3b4e5b4
--------------------------------------------------------------------------------
/Library/metadata/85/857fe0b9a726340a184f0c40cd6b5037:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/85/857fe0b9a726340a184f0c40cd6b5037
--------------------------------------------------------------------------------
/Library/metadata/85/85804baa809594d4e8910b733d2c3a07:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/85/85804baa809594d4e8910b733d2c3a07
--------------------------------------------------------------------------------
/Library/metadata/89/89216cbfd5d0a43bb9667e6d69f24804:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/89/89216cbfd5d0a43bb9667e6d69f24804
--------------------------------------------------------------------------------
/Library/metadata/89/89af0b4e9c7e74ea4963a83aca3ccd07:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/89/89af0b4e9c7e74ea4963a83aca3ccd07
--------------------------------------------------------------------------------
/Library/metadata/8a/8aa1ecef7a0fa491197fc860f98b2cac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/8a/8aa1ecef7a0fa491197fc860f98b2cac
--------------------------------------------------------------------------------
/Library/metadata/8b/8bbbb524c12c643b397638156234d45f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/8b/8bbbb524c12c643b397638156234d45f
--------------------------------------------------------------------------------
/Library/metadata/8e/8e3c23c0e61c44237bb6406ff882d278:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/8e/8e3c23c0e61c44237bb6406ff882d278
--------------------------------------------------------------------------------
/Library/metadata/8e/8ea776cff9efd4eed9c51e21c2c5780c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/8e/8ea776cff9efd4eed9c51e21c2c5780c
--------------------------------------------------------------------------------
/Library/metadata/8f/8f78e896653374ff089a09998489a12a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/8f/8f78e896653374ff089a09998489a12a
--------------------------------------------------------------------------------
/Library/metadata/90/90f87c63fdce843cfa78a0ae3ee23964:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/90/90f87c63fdce843cfa78a0ae3ee23964
--------------------------------------------------------------------------------
/Library/metadata/92/92beda72284014a12b003d00a4c3aa2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/92/92beda72284014a12b003d00a4c3aa2d
--------------------------------------------------------------------------------
/Library/metadata/93/93e07c19ee43049a38a2e9a4e9e344c7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/93/93e07c19ee43049a38a2e9a4e9e344c7
--------------------------------------------------------------------------------
/Library/metadata/94/94bba2c79807c44eda4354ca726cb0d5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/94/94bba2c79807c44eda4354ca726cb0d5
--------------------------------------------------------------------------------
/Library/metadata/95/95f04007463ea46b9bb03d8352bbd2a9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/95/95f04007463ea46b9bb03d8352bbd2a9
--------------------------------------------------------------------------------
/Library/metadata/96/9607d5f63a852414492b34b385eb73f8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/96/9607d5f63a852414492b34b385eb73f8
--------------------------------------------------------------------------------
/Library/metadata/98/982effeca03804e7b8f7b0c7ae91cc2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/98/982effeca03804e7b8f7b0c7ae91cc2d
--------------------------------------------------------------------------------
/Library/metadata/98/98f4f25baa7854072bd664bd2469dc7c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/98/98f4f25baa7854072bd664bd2469dc7c
--------------------------------------------------------------------------------
/Library/metadata/98/98f5c0b1485764bbdabe405f7598b764:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/98/98f5c0b1485764bbdabe405f7598b764
--------------------------------------------------------------------------------
/Library/metadata/9c/9c0cd22eb9179451ebdd4561b5ab72f9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/9c/9c0cd22eb9179451ebdd4561b5ab72f9
--------------------------------------------------------------------------------
/Library/metadata/9d/9dd5663d78ac04a219dc22c3f04b1644:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/9d/9dd5663d78ac04a219dc22c3f04b1644
--------------------------------------------------------------------------------
/Library/metadata/a0/a087cdd23ebe04f7dbe621f3a1c0a696:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a0/a087cdd23ebe04f7dbe621f3a1c0a696
--------------------------------------------------------------------------------
/Library/metadata/a2/a257da9a3fc6d47708189b70187da492:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a2/a257da9a3fc6d47708189b70187da492
--------------------------------------------------------------------------------
/Library/metadata/a3/a35ab55216fc7463f874bcea50829dcb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a3/a35ab55216fc7463f874bcea50829dcb
--------------------------------------------------------------------------------
/Library/metadata/a4/a423b0b7339474022a66f6f5b648a732:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a4/a423b0b7339474022a66f6f5b648a732
--------------------------------------------------------------------------------
/Library/metadata/a4/a4e63045572b6496d9aee003049f2f80:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a4/a4e63045572b6496d9aee003049f2f80
--------------------------------------------------------------------------------
/Library/metadata/a5/a572c7c97c84241df9419ba418cd0ed2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a5/a572c7c97c84241df9419ba418cd0ed2
--------------------------------------------------------------------------------
/Library/metadata/a7/a76c1526a5d3644c4ac5ee8d9f5b8fe9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a7/a76c1526a5d3644c4ac5ee8d9f5b8fe9
--------------------------------------------------------------------------------
/Library/metadata/a7/a7e1cda58c8684a1399f7dc2d1503039:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/a7/a7e1cda58c8684a1399f7dc2d1503039
--------------------------------------------------------------------------------
/Library/metadata/ab/aba6533746434446481d5fa0179addc6:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ab/aba6533746434446481d5fa0179addc6
--------------------------------------------------------------------------------
/Library/metadata/ae/aea67b02062eb4318a63d141ce610d57:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ae/aea67b02062eb4318a63d141ce610d57
--------------------------------------------------------------------------------
/Library/metadata/ae/aeeb0148f350a4330bed69b9d15a40df:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ae/aeeb0148f350a4330bed69b9d15a40df
--------------------------------------------------------------------------------
/Library/metadata/b1/b1e29ddadcfc143c7a2581b5b89e4658:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/b1/b1e29ddadcfc143c7a2581b5b89e4658
--------------------------------------------------------------------------------
/Library/metadata/b3/b359ee5dd2e5d4e64b32585f59ff77dc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/b3/b359ee5dd2e5d4e64b32585f59ff77dc
--------------------------------------------------------------------------------
/Library/metadata/b4/b479aff1a56f74c7bb741baa22191458:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/b4/b479aff1a56f74c7bb741baa22191458
--------------------------------------------------------------------------------
/Library/metadata/b5/b5b6942baa5a44214acf3305b232a4c2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/b5/b5b6942baa5a44214acf3305b232a4c2
--------------------------------------------------------------------------------
/Library/metadata/bd/bd2cd6fbbaa7449fea7b1de281559bce:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/bd/bd2cd6fbbaa7449fea7b1de281559bce
--------------------------------------------------------------------------------
/Library/metadata/bf/bf69e72efa04a441d90b5b0cb9b9bc55:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/bf/bf69e72efa04a441d90b5b0cb9b9bc55
--------------------------------------------------------------------------------
/Library/metadata/c2/c213ea7dc85db4118871a24c4c0f2ea2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c2/c213ea7dc85db4118871a24c4c0f2ea2
--------------------------------------------------------------------------------
/Library/metadata/c3/c38b1befba7684a538f1181019a176fa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c3/c38b1befba7684a538f1181019a176fa
--------------------------------------------------------------------------------
/Library/metadata/c3/c3a025f68d8464065866a63d7ec8df7e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c3/c3a025f68d8464065866a63d7ec8df7e
--------------------------------------------------------------------------------
/Library/metadata/c4/c4b8ed3b4f0e34844a2d594293add9f7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c4/c4b8ed3b4f0e34844a2d594293add9f7
--------------------------------------------------------------------------------
/Library/metadata/c6/c6fc6d30939914409a2101e8fddef9cb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c6/c6fc6d30939914409a2101e8fddef9cb
--------------------------------------------------------------------------------
/Library/metadata/c9/c91ea4f9c1fdb46db80d4e12e900b961:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/c9/c91ea4f9c1fdb46db80d4e12e900b961
--------------------------------------------------------------------------------
/Library/metadata/ca/ca0cecf2de06a48e7ac0427a3d3d01ff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ca/ca0cecf2de06a48e7ac0427a3d3d01ff
--------------------------------------------------------------------------------
/Library/metadata/ca/ca3aaef564f944b2bbb075ea68df443a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ca/ca3aaef564f944b2bbb075ea68df443a
--------------------------------------------------------------------------------
/Library/metadata/cc/ccd1c500f26684075afd0a042fd5801f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/cc/ccd1c500f26684075afd0a042fd5801f
--------------------------------------------------------------------------------
/Library/metadata/cc/ccd280f2d7e5a493b928542962e1fc0a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/cc/ccd280f2d7e5a493b928542962e1fc0a
--------------------------------------------------------------------------------
/Library/metadata/cd/cdb6bb67c299f41d48f355428fc963a5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/cd/cdb6bb67c299f41d48f355428fc963a5
--------------------------------------------------------------------------------
/Library/metadata/ce/ce174e0f1ac4a4e4fbaa4a615ad448e9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ce/ce174e0f1ac4a4e4fbaa4a615ad448e9
--------------------------------------------------------------------------------
/Library/metadata/cf/cf71faea665f94e98acf1dedadb55800:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/cf/cf71faea665f94e98acf1dedadb55800
--------------------------------------------------------------------------------
/Library/metadata/cf/cfbeb884b3d2a4af4a05b6ee044ed551:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/cf/cfbeb884b3d2a4af4a05b6ee044ed551
--------------------------------------------------------------------------------
/Library/metadata/d4/d4c0cd8fb14d34bc89c885641f0d1f9b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/d4/d4c0cd8fb14d34bc89c885641f0d1f9b
--------------------------------------------------------------------------------
/Library/metadata/d5/d53a4bb946b3f4c4da6f19a4b14b6a57:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/d5/d53a4bb946b3f4c4da6f19a4b14b6a57
--------------------------------------------------------------------------------
/Library/metadata/d6/d61ac50f6c9d94afda757799bfdd704e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/d6/d61ac50f6c9d94afda757799bfdd704e
--------------------------------------------------------------------------------
/Library/metadata/d6/d6a536bf16ab442efb4ee223b254a83a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/d6/d6a536bf16ab442efb4ee223b254a83a
--------------------------------------------------------------------------------
/Library/metadata/d9/d9787f9735b5640929f27e983396e14e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/d9/d9787f9735b5640929f27e983396e14e
--------------------------------------------------------------------------------
/Library/metadata/da/da82606dc7c5d43488a281b866da9d2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/da/da82606dc7c5d43488a281b866da9d2d
--------------------------------------------------------------------------------
/Library/metadata/dc/dcb01c0ab73de4296aba89f2090e472a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/dc/dcb01c0ab73de4296aba89f2090e472a
--------------------------------------------------------------------------------
/Library/metadata/de/de552a45850a747469c06da21a841fd8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/de/de552a45850a747469c06da21a841fd8
--------------------------------------------------------------------------------
/Library/metadata/de/ded3d3ec0601e4069acf9b4768ec0da2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/de/ded3d3ec0601e4069acf9b4768ec0da2
--------------------------------------------------------------------------------
/Library/metadata/df/df31f07fb6a2741078de4085acdaecac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/df/df31f07fb6a2741078de4085acdaecac
--------------------------------------------------------------------------------
/Library/metadata/e2/e24216cdc18d54b6f8bd52f5d3d3e0c1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e2/e24216cdc18d54b6f8bd52f5d3d3e0c1
--------------------------------------------------------------------------------
/Library/metadata/e2/e2ff54e23ffc6422fbc554ae0de5adde:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e2/e2ff54e23ffc6422fbc554ae0de5adde
--------------------------------------------------------------------------------
/Library/metadata/e3/e318f9117c68049a6862ea3c26787327:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e3/e318f9117c68049a6862ea3c26787327
--------------------------------------------------------------------------------
/Library/metadata/e3/e3c28eceebce94ea4a913d2e116b3ae4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e3/e3c28eceebce94ea4a913d2e116b3ae4
--------------------------------------------------------------------------------
/Library/metadata/e4/e46256580da6e49029ad39c943862d3b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e4/e46256580da6e49029ad39c943862d3b
--------------------------------------------------------------------------------
/Library/metadata/e4/e4f12f2a7e2564219af77e13f9bf69b7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e4/e4f12f2a7e2564219af77e13f9bf69b7
--------------------------------------------------------------------------------
/Library/metadata/e5/e51291d2e5a214c108a03725ec86f320:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e5/e51291d2e5a214c108a03725ec86f320
--------------------------------------------------------------------------------
/Library/metadata/e5/e529eedd331a440d5a8505dcef244f7f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e5/e529eedd331a440d5a8505dcef244f7f
--------------------------------------------------------------------------------
/Library/metadata/e6/e69d7735a75f143dd8d1efee1cc39a38:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e6/e69d7735a75f143dd8d1efee1cc39a38
--------------------------------------------------------------------------------
/Library/metadata/e9/e9ad76f22d80e405cae11702061b02be:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/e9/e9ad76f22d80e405cae11702061b02be
--------------------------------------------------------------------------------
/Library/metadata/eb/eb42110892dc14b16a8d855260dd4ebf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/eb/eb42110892dc14b16a8d855260dd4ebf
--------------------------------------------------------------------------------
/Library/metadata/ee/ee7237ae13e814028a0708491908f18e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ee/ee7237ae13e814028a0708491908f18e
--------------------------------------------------------------------------------
/Library/metadata/f1/f12e41fffe2294bdcb692bf381a5655b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/f1/f12e41fffe2294bdcb692bf381a5655b
--------------------------------------------------------------------------------
/Library/metadata/f2/f22825362024b4939a59ef0f50cff865:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/f2/f22825362024b4939a59ef0f50cff865
--------------------------------------------------------------------------------
/Library/metadata/f5/f5617e0869d094ec297a77dcd175ee5f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/f5/f5617e0869d094ec297a77dcd175ee5f
--------------------------------------------------------------------------------
/Library/metadata/f6/f68071dd43dd042a0ba36c6658cd0bdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/f6/f68071dd43dd042a0ba36c6658cd0bdc
--------------------------------------------------------------------------------
/Library/metadata/f7/f738e11c79ea942fab88f1066fe70cc6:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/f7/f738e11c79ea942fab88f1066fe70cc6
--------------------------------------------------------------------------------
/Library/metadata/fa/fa5aaaf50a472453aa0251be2cd91c8e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/fa/fa5aaaf50a472453aa0251be2cd91c8e
--------------------------------------------------------------------------------
/Library/metadata/fc/fcc1232c6469d42589abd82a1f34ee21:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/fc/fcc1232c6469d42589abd82a1f34ee21
--------------------------------------------------------------------------------
/Library/metadata/ff/ff3b94dd3b9e84ef5a43f8e4817a4862:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ff/ff3b94dd3b9e84ef5a43f8e4817a4862
--------------------------------------------------------------------------------
/Library/metadata/ff/ff8ead7a7d3e844e1927735d37889958:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Library/metadata/ff/ff8ead7a7d3e844e1927735d37889958
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/PMDMaterials.unitypackage:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/PMDMaterials.unitypackage
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/PMD Material Transparent.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/PMD Material Transparent.mat
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/PMD Material with Outline.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/PMD Material with Outline.mat
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/PMD Material with Outline Transparent.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thorikawa/unity-opencv-android/HEAD/Assets/Resources/PMDMaterial/PMD Material with Outline Transparent.mat
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.sln
2 | *.userprefs
3 | *.csproj
4 | *.pidb
5 | *.unityproj
6 | *.apk
7 | .DS_Store
8 | /Library/FailedAssetImports.txt
9 | /Library/cache/
10 | /Library/previews/
11 | /Library/ScriptAssemblies
12 | /obj
13 | /Temp
14 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | N3 AR
4 | capture marker
5 | capture
6 | capture again
7 | selected!
8 | capture blue
9 |
10 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/res/layout/marker_tracking.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/ComputeSkin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using UnityEngine;
6 | //using Mono.Simd;
7 |
8 | namespace MMD
9 | {
10 | namespace Skin
11 | {
12 | ///
13 | /// スキンの計算を行う
14 | ///
15 | public class ComputeMorph
16 | {
17 | ///
18 | /// モーフベクトルをweight値から計算する
19 | ///
20 | /// モーフベクトル
21 | /// ウェイト
22 | /// 表情の移動ベクトル
23 | public static void Compute(ref Vector3[] resultVector, Vector3[] morphVector, float weight)
24 | {
25 | // モーフベクトルを伸び縮みさせたものを結果として返す
26 | for (int i = 0; i < morphVector.Length; i++)
27 | resultVector[i] = morphVector[i] * weight;
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Assets/XFileImporter/XFileImporterWindow.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | #if UNITY_EDITOR
5 | using UnityEditor;
6 | public class XFileImporterWindow : EditorWindow {
7 | Object xFile = null;
8 |
9 | [MenuItem ("Plugins/XFile Importer")]
10 | static void Init() {
11 | var window = (XFileImporterWindow)EditorWindow.GetWindow(true, "XFile Importer");
12 | window.Show();
13 | }
14 |
15 | void OnGUI() {
16 | const int height = 20;
17 |
18 | xFile = EditorGUI.ObjectField(
19 | new Rect(0, 0, position.width-16, height), "XFile" ,xFile, typeof(Object));
20 |
21 | if (xFile != null) {
22 | if (GUI.Button(new Rect(0, height+2, position.width/2, height), "Convert")) {
23 | XFileImporter imp = new XFileImporter(xFile);
24 | xFile = null; // 読み終わったので空にする
25 | }
26 | } else {
27 | EditorGUI.LabelField(new Rect(0, height+2, position.width, height), "Missing", "Select XFile");
28 | }
29 | }
30 | }
31 | #endif
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/README.md:
--------------------------------------------------------------------------------
1 | MMD Shader for Unity
2 | ========
3 |
4 | ### Preview ###
5 |
6 |
7 |
8 | Presented by [3DCGArts](http://www.3dcg-arts.net/)
9 |
10 | ### Download ###
11 |
12 | [Version 1.2](https://github.com/3dcgarts/MMD-Shader-for-Unity/zipball/v1.2)
13 |
14 | ### 使い方 ###
15 |
16 | Unityパッケージである
17 |
18 | ```
19 | PMDMaterials.unitypackage
20 | ```
21 |
22 | を、Unityのメニューの
23 |
24 | ```
25 | Assets->Import Package->Custom Package...
26 | ```
27 |
28 | からインポートしてください。
29 |
30 | シェーダは以下の4つが用意されています。
31 |
32 | ```
33 | MMD/PMDMaterial
34 | MMD/PMDMaterial-with-Outline
35 | MMD/Transparent/PMDMaterial
36 | MMD/Transparent/PMDMaterial-with-Outline
37 | ```
38 |
39 | Transparent とついているものは、透明な材質に使ってください。
40 |
41 | Outline とついているものは、輪郭線を表示する材質に使ってください。
42 |
43 | ### その他 ###
44 |
45 | シェーダに割り当てられているプロパティは、PMDEditor の値に準拠しています。
46 |
47 | Directional Light (Color: White, Intensity: 0.5) の光源を受けている時に正しく表示されるように設計されています。
48 |
49 | 「Lat式ミク」のような特殊なメッシュ構造を持ったモデルも正しく表示することができます。
50 |
51 |
--------------------------------------------------------------------------------
/Assets/XFileImporter/Private/XFileImporter.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | /*
5 | * 1. Google Sketchupのプラグインをインストール
6 | * http://www.3drad.com/Google-SketchUp-To-DirectX-XNA-Exporter-Plug-in.htm
7 | * (プラグインはSketchupをインストールしたフォルダのPluginsフォルダにスクリプトを入れればOK)
8 | *
9 | * 2. Xファイルの出力
10 | * 適当にフォルダを指定して出力
11 | *
12 | * 3. Projectへの読み込み
13 | * 出力したフォルダごとProjectに投げればOK
14 | *
15 | * 4. スクリプトの適用
16 | * 適当なGameObjectにこのスクリプトを適用させる
17 | * xFile変数にロードしたXファイルをD&Dして実行すれば出来上がり
18 | *
19 | * 諸注意
20 | * Xファイルは方言が多いので、現在は1.のプラグインで出力したファイルのみ対応
21 | */
22 |
23 | #if UNITY_EDITOR
24 |
25 | public class XFileImporter {
26 |
27 | public Object xFile;
28 |
29 | Object prefab;
30 | Mesh mesh;
31 | Material[] material;
32 |
33 | // Use this for initialization
34 | public XFileImporter(Object xFile) {
35 | xfile.XFileConverter cnv = new xfile.XFileConverter(xFile);
36 |
37 | prefab = cnv.CreatePrefab();
38 | material = cnv.CreateMaterials();
39 | mesh = cnv.CreateMesh();
40 | cnv.ReplacePrefab(prefab, mesh, material);
41 | }
42 | }
43 |
44 | #endif
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterialVertFrag.cginc:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | float4 _Color;
19 | float _Opacity;
20 | float4 _OutlineColor;
21 | float _OutlineWidth;
22 |
23 | struct v2f
24 | {
25 | float4 pos : SV_POSITION;
26 | float2 uv : TEXCOORD0;
27 | };
28 |
29 | v2f vert( appdata_base v )
30 | {
31 | v2f o;
32 | float4 pos = mul( UNITY_MATRIX_MVP, v.vertex );
33 | float width = 0.01 * _OutlineWidth;
34 | float4 edge_pos = v.vertex + pos.w * width * float4( v.normal, 0.0 );
35 | o.pos = mul( UNITY_MATRIX_MVP, edge_pos );
36 |
37 | return o;
38 | }
39 | half4 frag( v2f i ) : COLOR
40 | {
41 | return half4( _OutlineColor.rgb, _Opacity );
42 | }
43 |
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterial.shader:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | Shader "MMD/PMDMaterial"
19 | {
20 | Properties
21 | {
22 | _Color("拡散色", Color) = (1,1,1,1)
23 | _SpecularColor("反射色", Color) = (1,1,1)
24 | _AmbColor("環境色", Color) = (1,1,1)
25 | _Shininess("反射強度", Float) = 0
26 | _MainTex("テクスチャ", 2D) = "white" {}
27 | _ToonTex("トゥーン", 2D) = "white" {}
28 | _SphereAddTex("スフィア(加算)", 2D) = "black" {}
29 | _SphereMulTex("スフィア(乗算)", 2D) = "white" {}
30 | }
31 |
32 | SubShader
33 | {
34 | // First Pass
35 | Pass
36 | {
37 | Cull Off
38 | }
39 |
40 | // Surface Shader
41 | CGPROGRAM
42 | #pragma surface surf MMD
43 | #include "MeshPmdMaterialSurface.cginc"
44 | ENDCG
45 | }
46 |
47 | // Other Environment
48 | Fallback "Diffuse"
49 | }
50 |
--------------------------------------------------------------------------------
/Assets/Scripts/Miku.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public class Miku : MonoBehaviour
5 | {
6 | private Matrix4x4 inverseMatrix;
7 |
8 | // Use this for initialization
9 | void Start ()
10 | {
11 | }
12 |
13 | // Update is called once per frame
14 | void Update ()
15 | {
16 | }
17 |
18 | void JavaMessage (string message)
19 | {
20 | Debug.Log ("message from java: " + message);
21 | string[] rects = message.Split (new char[] {'-'});
22 | if (rects [0].Equals ("X")) {
23 | renderer.enabled = false;
24 | return;
25 | }
26 | renderer.enabled = true;
27 | Rect r = getRect (rects [0]);
28 | Vector3 c = getCenter (r);
29 | // Debug.Log ("center: " + c.ToString());
30 |
31 | Plane hPlane = new Plane (Vector3.forward, Vector3.zero);
32 | float distance = 0;
33 | Ray ray = Camera.main.ScreenPointToRay (c);
34 | if (hPlane.Raycast (ray, out distance)) {
35 | Vector3 newPos = ray.GetPoint (distance);
36 | newPos.x += 7.0F;
37 | // Debug.Log (newPos);
38 | transform.position = newPos;
39 |
40 | }
41 | }
42 |
43 | Rect getRect (string s)
44 | {
45 | string[] datas = s.Split (new char[] {'_'});
46 | float x = float.Parse (datas [0]);
47 | float y = float.Parse (datas [1]);
48 | float w = float.Parse (datas [2]);
49 | float h = float.Parse (datas [3]);
50 | return new Rect (x, y, w, h);
51 | }
52 |
53 | Vector3 getCenter (Rect rect)
54 | {
55 | return new Vector3 ((rect.xMin + rect.xMax) / 2.0F, (rect.yMin + rect.yMax) / 2.0F, 0.0F);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/VMDLoaderWindow.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using UnityEngine;
3 | using System.Collections;
4 | using UnityEditor;
5 |
6 | public class VMDLoaderWindow : EditorWindow {
7 | Object vmdFile;
8 | GameObject pmdPrefab;
9 | bool createAnimationFile;
10 |
11 | [MenuItem ("Plugins/MMD Loader/VMD Loader")]
12 | static void Init() {
13 | var window = (VMDLoaderWindow)EditorWindow.GetWindow(true, "VMDLoader");
14 | window.Show();
15 | }
16 |
17 | void OnGUI() {
18 | const int height = 20;
19 |
20 | pmdPrefab = EditorGUI.ObjectField(
21 | new Rect(0, 0, position.width - 16, height), "PMD Prefab", pmdPrefab, typeof(GameObject), false) as GameObject;
22 | vmdFile = EditorGUI.ObjectField(
23 | new Rect(0, height + 2, position.width - 16, height), "VMD File", vmdFile, typeof(Object), false);
24 | createAnimationFile = EditorGUI.Toggle(
25 | new Rect(0, height * 2 + 4, position.width - 16, height), "Create Asset", createAnimationFile);
26 |
27 |
28 | if (pmdPrefab != null && vmdFile != null)
29 | {
30 | if (GUI.Button(new Rect(0, height * 3 + 6, position.width / 2, 16), "Convert"))
31 | {
32 | new VMDLoaderScript(vmdFile, pmdPrefab, createAnimationFile);
33 | vmdFile = null;
34 | }
35 | }
36 | else
37 | {
38 | if (pmdPrefab == null)
39 | EditorGUI.LabelField(new Rect(0, height * 3 + 6, position.width, height), "Missing", "Select PMD Prefab");
40 | else if (vmdFile == null)
41 | EditorGUI.LabelField(new Rect(0, height * 3 + 6, position.width, height), "Missing", "Select VMD File");
42 | else
43 | EditorGUI.LabelField(new Rect(0, height * 3 + 6, position.width, height), "Missing", "Select PMD and VMD");
44 | }
45 | }
46 | }
47 | #endif
--------------------------------------------------------------------------------
/Assets/MMDLoader/PMDLoaderWindow.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using UnityEngine;
3 | using System.Collections;
4 | using UnityEditor;
5 | using MMD.PMD;
6 |
7 | public class PMDLoaderWindow : EditorWindow {
8 | Object pmdFile = null;
9 | bool rigidFlag = true;
10 | bool use_mecanim = true;
11 | ShaderType shader_type = ShaderType.MMDShader;
12 |
13 | bool use_ik = true;
14 |
15 | [MenuItem("Plugins/MMD Loader/PMD Loader")]
16 | static void Init() {
17 | var window = (PMDLoaderWindow)EditorWindow.GetWindow(true, "PMDLoader");
18 | window.Show();
19 | }
20 |
21 | void OnGUI() {
22 | const int height = 20;
23 | int width = (int)position.width;// -16;
24 |
25 | pmdFile = EditorGUI.ObjectField(
26 | new Rect(0, 0, width, height), "PMD File" , pmdFile, typeof(Object), false);
27 |
28 | // シェーダの種類
29 | shader_type = (ShaderType)EditorGUI.EnumPopup(new Rect(0, height, width, height), "Shader Type", shader_type);
30 |
31 | // 剛体を入れるかどうか
32 | rigidFlag = EditorGUI.Toggle(new Rect(0, height * 2, width / 2, height), "Rigidbody", rigidFlag);
33 |
34 | // Mecanimを使うかどうか
35 | use_mecanim = EditorGUI.Toggle(new Rect(0, height * 3, width / 2, height), "Use Mecanim", use_mecanim);
36 |
37 | // IKを使うかどうか
38 | use_ik = EditorGUI.Toggle(new Rect(0, height * 4, width / 2, height), "Use IK", use_ik);
39 |
40 | int buttonHeight = height * 5;
41 | if (pmdFile != null) {
42 | if (GUI.Button(new Rect(0, buttonHeight, width / 2, height), "Convert")) {
43 | new PMDLoaderScript(pmdFile, shader_type, rigidFlag, use_mecanim, use_ik);
44 | pmdFile = null; // 読み終わったので空にする
45 | }
46 | } else {
47 | EditorGUI.LabelField(new Rect(0, buttonHeight, width, height), "Missing", "Select PMD File");
48 | }
49 | }
50 | }
51 | #endif
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterialOutline.shader:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | Shader "MMD/PMDMaterial-with-Outline"
19 | {
20 | Properties
21 | {
22 | _Color("拡散色", Color) = (1,1,1,1)
23 | _SpecularColor("反射色", Color) = (1,1,1)
24 | _AmbColor("環境色", Color) = (1,1,1)
25 | _Shininess("反射強度", Float) = 0
26 | _OutlineColor("エッジ色", Color) = (0,0,0,1)
27 | _OutlineWidth("エッジ幅", Range(0,1)) = 0.2
28 | _MainTex("テクスチャ", 2D) = "white" {}
29 | _ToonTex("トゥーン", 2D) = "white" {}
30 | _SphereAddTex("スフィア(加算)", 2D) = "black" {}
31 | _SphereMulTex("スフィア(乗算)", 2D) = "white" {}
32 | }
33 |
34 | SubShader
35 | {
36 | // Surface Shader
37 | Cull Off
38 | CGPROGRAM
39 | #pragma surface surf MMD
40 | #include "MeshPmdMaterialSurface.cginc"
41 | ENDCG
42 |
43 | // Outline Pass
44 | Pass
45 | {
46 | Cull Front
47 | Lighting Off
48 |
49 | CGPROGRAM
50 | #pragma vertex vert
51 | #pragma fragment frag
52 | #include "UnityCG.cginc"
53 | #include "MeshPmdMaterialVertFrag.cginc"
54 | ENDCG
55 | }
56 | }
57 |
58 | // Other Environment
59 | Fallback "Diffuse"
60 | }
61 |
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterial-Trans.shader:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | Shader "MMD/Transparent/PMDMaterial"
19 | {
20 | Properties
21 | {
22 | _Color("拡散色", Color) = (1,1,1,1)
23 | _Opacity("不透明度", Float) = 1.0
24 | _SpecularColor("反射色", Color) = (1,1,1)
25 | _AmbColor("環境色", Color) = (1,1,1)
26 | _Shininess("反射強度", Float) = 0
27 | _MainTex("テクスチャ", 2D) = "white" {}
28 | _ToonTex("トゥーン", 2D) = "white" {}
29 | _SphereAddTex("スフィア(加算)", 2D) = "black" {}
30 | _SphereMulTex("スフィア(乗算)", 2D) = "white" {}
31 | }
32 |
33 | SubShader
34 | {
35 | // Settings
36 | Tags
37 | {
38 | "Queue" = "Transparent"
39 | "RenderType" = "Transparent"
40 | }
41 |
42 | // Surface Shader
43 | Cull Back
44 | ZWrite On
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | CGPROGRAM
47 | #pragma surface surf MMD
48 | #include "MeshPmdMaterialSurface.cginc"
49 | ENDCG
50 |
51 | // Surface Shader
52 | Cull Front
53 | ZWrite Off
54 | Blend SrcAlpha OneMinusSrcAlpha
55 | CGPROGRAM
56 | #pragma surface surf MMD
57 | #include "MeshPmdMaterialSurface.cginc"
58 | ENDCG
59 |
60 | }
61 |
62 | // Other Environment
63 | Fallback "Transparent/Diffuse"
64 | }
65 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/VMDLoaderScript.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using UnityEngine;
3 | using UnityEditor;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using System.IO;
7 | using System.Text;
8 |
9 | public class VMDLoaderScript : MonoBehaviour {
10 |
11 | //--------------------------------------------------------------------------------
12 | // ファイル読み込み
13 |
14 | public Object vmd;
15 | public GameObject assign_pmd; // 適用したいPMDファイル
16 | public string clip_name; // クリップの名前
17 | public bool create_asset;
18 |
19 | BinaryReader LoadFile(Object obj, string path)
20 | {
21 | FileStream f = new FileStream(path, FileMode.Open, FileAccess.Read);
22 | BinaryReader r = new BinaryReader(f);
23 | return r;
24 | }
25 |
26 | // VMDファイル読み込み
27 | void LoadVMDFile()
28 | {
29 | string path = AssetDatabase.GetAssetPath(this.vmd);
30 | BinaryReader bin = this.LoadFile(this.vmd, path);
31 |
32 | // パスからクリップ名を生成
33 | string[] nameBuf = path.Split('/');
34 | string clipNameBuf = assign_pmd.name + "_" + nameBuf[nameBuf.Length - 1].Split('.')[0];
35 | BurnUnityFormatForVMD(MMD.VMD.VMDLoader.Load(bin, path, clipNameBuf));
36 | bin.Close();
37 | }
38 |
39 | // Use this for initialization
40 | public VMDLoaderScript(Object vmdFile, GameObject assignPmdPrefab, bool createAsset)
41 | {
42 | this.vmd = vmdFile;
43 | this.assign_pmd = assignPmdPrefab;
44 | this.create_asset = createAsset;
45 |
46 | if (this.vmd != null)
47 | LoadVMDFile();
48 | }
49 |
50 | //--------------------------------------------------------------------------------
51 | // VMDファイルの読み込み
52 |
53 | Animation anim = null;
54 |
55 | void BurnUnityFormatForVMD(MMD.VMD.VMDFormat format)
56 | {
57 | MMD.VMD.VMDConverter conv = new MMD.VMD.VMDConverter();
58 | conv.CreateAnimationClip(format, this.assign_pmd, this.anim, this.create_asset);
59 | }
60 | }
61 | #endif
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterialOutline-Trans.shader:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | Shader "MMD/Transparent/PMDMaterial-with-Outline"
19 | {
20 | Properties
21 | {
22 | _Color("拡散色", Color) = (1,1,1,1)
23 | _Opacity("不透明度", Float) = 1.0
24 | _SpecularColor("反射色", Color) = (1,1,1)
25 | _AmbColor("環境色", Color) = (1,1,1)
26 | _Shininess("反射強度", Float) = 0
27 | _OutlineColor("エッジ色", Color) = (0,0,0,1)
28 | _OutlineWidth("エッジ幅", Range(0,1)) = 0.2
29 | _MainTex("テクスチャ", 2D) = "white" {}
30 | _ToonTex("トゥーン", 2D) = "white" {}
31 | _SphereAddTex("スフィア(加算)", 2D) = "black" {}
32 | _SphereMulTex("スフィア(乗算)", 2D) = "white" {}
33 | }
34 |
35 | SubShader
36 | {
37 | // Settings
38 | Tags
39 | {
40 | // JUST After Transparent
41 | "Queue" = "Transparent+1"
42 | "RenderType" = "Transparent"
43 | }
44 |
45 | // Surface Shader Pass
46 | Cull Back
47 | ZWrite On
48 | Blend SrcAlpha OneMinusSrcAlpha
49 | CGPROGRAM
50 | #pragma surface surf MMD
51 | #include "MeshPmdMaterialSurface.cginc"
52 | ENDCG
53 |
54 | // Outline Pass
55 | Pass
56 | {
57 | Cull Front
58 | Lighting Off
59 | CGPROGRAM
60 | #pragma vertex vert
61 | #pragma fragment frag
62 | #include "UnityCG.cginc"
63 | #include "MeshPmdMaterialVertFrag.cginc"
64 | ENDCG
65 | }
66 |
67 | // Surface Shader Pass ( Back )
68 | Cull Front
69 | ZWrite Off
70 | Blend SrcAlpha OneMinusSrcAlpha
71 | CGPROGRAM
72 | #pragma surface surf MMD
73 | #include "MeshPmdMaterialSurface.cginc"
74 | ENDCG
75 |
76 | }
77 |
78 | // Other Environment
79 | Fallback "Transparent/Diffuse"
80 | }
81 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
17 |
18 |
19 |
20 |
23 |
26 |
29 |
32 |
33 |
38 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
55 |
58 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/Shaders/MeshPmdMaterialSurface.cginc:
--------------------------------------------------------------------------------
1 | /*
2 | * MMD Shader for Unity
3 | *
4 | * Copyright 2012 Masataka SUMI, Takahiro INOUE
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | float4 _Color;
19 | float _Opacity;
20 | float4 _AmbColor;
21 | float4 _SpecularColor;
22 | float _Shininess;
23 | sampler2D _MainTex;
24 | sampler2D _ToonTex;
25 | sampler2D _SphereAddTex;
26 | sampler2D _SphereMulTex;
27 |
28 | struct EditorSurfaceOutput
29 | {
30 | half3 Albedo;
31 | half3 Normal;
32 | half3 Emission;
33 | half3 Gloss;
34 | half Specular;
35 | half Alpha;
36 | half4 Custom;
37 | };
38 |
39 | inline half4 LightingMMD (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
40 | {
41 | // LightColor revison
42 | float4 lightColor = _LightColor0 * 1.2 * atten;
43 |
44 | // Specular
45 | float specularStrength = s.Specular;
46 | float dirDotNormalHalf = max(0, dot(s.Normal, normalize(lightDir + viewDir)));
47 | float dirSpecularWeight = pow( dirDotNormalHalf, _Shininess );
48 | float4 dirSpecular = _SpecularColor * lightColor * dirSpecularWeight;
49 | // ToonMap
50 | float lightStrength = dot(lightDir, s.Normal) * 0.5 + 0.5;
51 | float4 toon = tex2D( _ToonTex, float2( specularStrength, lightStrength ) );
52 | // Output
53 | float4 color = saturate( _AmbColor + ( _Color * lightColor ) );
54 | color *= s.Custom;
55 | color += dirSpecular;
56 | color *= toon;
57 | color.a = s.Alpha;
58 | return color;
59 | }
60 |
61 | struct Input
62 | {
63 | float2 uv_MainTex;
64 | };
65 |
66 | void surf (Input IN, inout EditorSurfaceOutput o)
67 | {
68 | // Defaults
69 | o.Albedo = 0.0;
70 | o.Emission = 0.0;
71 | o.Gloss = 0.0;
72 | o.Specular = 0.0;
73 |
74 | // Diffuse Map
75 | float2 uv_coord = float2( IN.uv_MainTex.x, IN.uv_MainTex.y );
76 | float4 tex_color = tex2D( _MainTex, uv_coord );
77 | // Sphere Map
78 | float3 viewNormal = normalize( mul( UNITY_MATRIX_MV, float4(normalize(o.Normal), 0.0) ).xyz );
79 | float2 sphereUv = viewNormal.xy * 0.5 + 0.5;
80 | float4 sphereAdd = tex2D( _SphereAddTex, sphereUv );
81 | float4 sphereMul = tex2D( _SphereMulTex, sphereUv );
82 |
83 | // Output
84 | o.Custom = tex_color; // DiffuseTex Default:White
85 | o.Custom += sphereAdd; // SphereAddTex Default:Black
86 | o.Custom *= sphereMul; // SphereMulTex Default:White
87 | o.Custom.a = 1.0;
88 | o.Alpha = _Opacity * tex_color.a;
89 | }
90 |
--------------------------------------------------------------------------------
/Assets/Scripts/MyCamera.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections.Generic;
3 |
4 | public class MyCamera : MonoBehaviour
5 | {
6 | AndroidJavaObject currentActivity;
7 | private static int w = 640;
8 | private static int h = 360;
9 |
10 | // Use this for initialization
11 | void Start ()
12 | {
13 | Debug.Log ("camera start");
14 |
15 | AndroidJavaClass jc = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");
16 | currentActivity = jc.GetStatic ("currentActivity");
17 | currentActivity.Call ("onUnityLoaded");
18 |
19 | float[] cameraParam = currentActivity.Call ("getCameraParameters");
20 | Matrix4x4 proj = buildProjectionMatrix (cameraParam, w, h);
21 | camera.projectionMatrix = proj;
22 | }
23 |
24 | void Update ()
25 | {
26 | bool findMarker = currentActivity.Call ("getFindMarker");
27 | float[] transformation = currentActivity.Call ("getTransformation");
28 |
29 | Matrix4x4 transMat;
30 | if (!findMarker || transformation == null) {
31 | SetMatrix (Matrix4x4.zero);
32 | return;
33 | } else {
34 | transMat = new Matrix4x4 ();
35 | for (int i=0; i<16; i++) {
36 | transMat [i] = transformation [i];
37 | }
38 | SetMatrix (transMat);
39 | }
40 | }
41 |
42 | private void SetMatrix (Matrix4x4 m)
43 | {
44 | // the following code is equals to "camera.worldToCameraMatrix = m;" ??
45 | Vector3 pos = new Vector3 (m.m03, m.m13, m.m23);
46 | Quaternion q = QuaternionFromMatrix (m);
47 | // fix rotate around y
48 | q.y = -q.y;
49 | m = Matrix4x4.TRS (pos, q, new Vector3 (1, 1, -1));
50 |
51 | // stand up miku
52 | Quaternion objRotate = Quaternion.Euler (-90, 0, 0);
53 | Matrix4x4 objRotateMatrix = Matrix4x4.TRS (Vector3.zero, objRotate, Vector3.one);
54 | m = m * objRotateMatrix;
55 | camera.worldToCameraMatrix = m;
56 | }
57 |
58 | Matrix4x4 buildProjectionMatrix (float[] cameraParam, float w, float h)
59 | {
60 | float near = 0.01f; // Near clipping distance
61 | float far = 100f; // Far clipping distance
62 |
63 | Matrix4x4 projectionMatrix = new Matrix4x4 ();
64 | // Camera parameters
65 | float f_x = cameraParam [0]; // Focal length in x axis
66 | float f_y = cameraParam [1]; // Focal length in y axis (usually the same?)
67 | float c_x = cameraParam [2]; // Camera primary point x
68 | float c_y = cameraParam [3]; // Camera primary point y
69 |
70 | projectionMatrix [0] = 2.0f * f_x / w;
71 | projectionMatrix [1] = 0.0f;
72 | projectionMatrix [2] = 0.0f;
73 | projectionMatrix [3] = 0.0f;
74 |
75 | projectionMatrix [4] = 0.0f;
76 | projectionMatrix [5] = 2.0f * f_y / h;
77 | projectionMatrix [6] = 0.0f;
78 | projectionMatrix [7] = 0.0f;
79 |
80 | projectionMatrix [8] = 2.0f * c_x / w - 1.0f;
81 | projectionMatrix [9] = 2.0f * c_y / h - 1.0f;
82 | projectionMatrix [10] = -(far + near) / (far - near);
83 | projectionMatrix [11] = -1.0f;
84 |
85 | projectionMatrix [12] = 0.0f;
86 | projectionMatrix [13] = 0.0f;
87 | projectionMatrix [14] = -2.0f * far * near / (far - near);
88 | projectionMatrix [15] = 0.0f;
89 |
90 | return projectionMatrix;
91 | }
92 |
93 | private static Quaternion QuaternionFromMatrix (Matrix4x4 m)
94 | {
95 | Quaternion q = Quaternion.LookRotation (m.GetColumn (2), m.GetColumn (1));
96 | return q;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/MMDMathf.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public class MMDMathf
5 | {
6 | public static Matrix4x4 CreateRotationXMatrix(float rad)
7 | {
8 | Matrix4x4 m = Matrix4x4.identity;
9 | float cos = Mathf.Cos(rad), sin = Mathf.Sin(rad);
10 | m.m11 = cos; m.m12 = -sin;
11 | m.m21 = sin; m.m22 = cos;
12 | return m;
13 | }
14 |
15 | public static Matrix4x4 CreateRotationYMatrix(float rad)
16 | {
17 | Matrix4x4 m = Matrix4x4.identity;
18 | float cos = Mathf.Cos(rad), sin = Mathf.Sin(rad);
19 | m.m00 = cos; m.m02 = sin;
20 | m.m20 = -sin; m.m22 = cos;
21 | return m;
22 | }
23 |
24 | public static Matrix4x4 CreateRotationZMatrix(float rad)
25 | {
26 | Matrix4x4 m = Matrix4x4.identity;
27 | float cos = Mathf.Cos(rad), sin = Mathf.Sin(rad);
28 | m.m01 = cos; m.m02 = -sin;
29 | m.m11 = sin; m.m12 = cos;
30 | return m;
31 | }
32 |
33 | public static Matrix4x4 CreateRotationMatrixFromRollPitchYaw(float r, float p, float y)
34 | {
35 | Matrix4x4 m = Matrix4x4.identity;
36 | float rc = Mathf.Cos(r), rs = Mathf.Sin(r); // Z
37 | float pc = Mathf.Cos(p), ps = Mathf.Sin(p); // Y
38 | float yc = Mathf.Cos(y), ys = Mathf.Sin(y);; // X
39 | m.m00 = rc*pc; m.m01 = rc*ps*ys-rs*yc; m.m02 = rc*ps*yc+rs*ys;
40 | m.m10 = rs*pc; m.m11 = rs*ps*ys+rc*yc; m.m12 = rs*ps*yc-rc*ys;
41 | m.m20 = -ps; m.m21 = pc*ys; m.m22 = pc*yc;
42 | return m;
43 | }
44 |
45 | public static Vector3 CreatePositionFromMatrix(Matrix4x4 m)
46 | {
47 | return new Vector3(m.m30, m.m31, m.m33);
48 | }
49 |
50 | public static Quaternion CreateQuaternionFromRotationMatrix(Matrix4x4 m)
51 | {
52 | Quaternion q;
53 | const float quad = 1.0f / 4.0f;
54 | q.x = ( m.m00 + m.m11 + m.m22 + 1.0f) * quad;
55 | q.y = ( m.m00 - m.m11 - m.m22 + 1.0f) * quad;
56 | q.z = (-m.m00 + m.m11 - m.m22 + 1.0f) * quad;
57 | q.w = (-m.m00 - m.m11 + m.m22 + 1.0f) * quad;
58 | if (q.x < 0.0f) q.x = 0.0f;
59 | if (q.y < 0.0f) q.y = 0.0f;
60 | if (q.z < 0.0f) q.z = 0.0f;
61 | if (q.w < 0.0f) q.w = 0.0f;
62 | q.x = Mathf.Sqrt(q.x);
63 | q.y = Mathf.Sqrt(q.y);
64 | q.z = Mathf.Sqrt(q.z);
65 | q.w = Mathf.Sqrt(q.w);
66 | if (q.x >= q.y && q.x >= q.z && q.x >= q.w)
67 | {
68 | q.x *= 1.0f;
69 | q.y *= Sign(m.m22 - m.m13);
70 | q.z *= Sign(m.m03 - m.m21);
71 | q.w *= Sign(m.m11 - m.m02);
72 | }
73 | else if (q.y >= q.x && q.y >= q.z && q.y >= q.w)
74 | {
75 | q.x *= Sign(m.m22 - m.m13);
76 | q.y *= 1.0f;
77 | q.z *= Sign(m.m11 + m.m02);
78 | q.w *= Sign(m.m03 + m.m21);
79 | }
80 | else if(q.z >= q.x && q.z >= q.y && q.z >= q.w) {
81 | q.x *= Sign(m.m03 - m.m21);
82 | q.y *= Sign(m.m11 + m.m02);
83 | q.z *= +1.0f;
84 | q.w *= Sign(m.m22 + m.m13);
85 | } else if(q.w >= q.x && q.w >= q.y && q.w >= q.z) {
86 | q.x *= Sign(m.m11 - m.m02);
87 | q.y *= Sign(m.m21 + m.m03);
88 | q.z *= Sign(m.m22 + m.m13);
89 | q.w *= +1.0f;
90 | }
91 | float r = 1.0f / Norm(q.x, q.y, q.z, q.w);
92 | q.x *= r;
93 | q.y *= r;
94 | q.z *= r;
95 | q.w *= r;
96 | return q;
97 | }
98 |
99 | private static float Sign(float x)
100 | {
101 | return (x >= 0.0f) ? 1.0f : -1.0f;
102 | }
103 |
104 | private static float Norm(float a, float b, float c, float d)
105 | {
106 | return Mathf.Sqrt(a*a+b*b+c*c+d*d);
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Assets/Resources/ExpressionManagerScript.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using UnityEngine;
6 |
7 | ///
8 | /// 表情の管理クラス
9 | ///
10 | public class ExpressionManagerScript : MonoBehaviour
11 | {
12 | public int[] indices;
13 |
14 | public Vector3[] source; // 元頂点, source_position
15 |
16 | public Vector3[] composite;
17 |
18 | public Vector3[] prev_comp;
19 |
20 | public Mesh mesh; // メッシュ
21 |
22 | public MMDSkinsScript[] skin_script; // 子供の表情のスクリプト配列
23 |
24 | //int lip_count = 0;
25 | //int eye_count = 0;
26 | //int eye_brow_count = 0;
27 | //int other_count = 0;
28 |
29 | void Init()
30 | {
31 | // meshの取得
32 | mesh = transform.parent.gameObject.GetComponent().sharedMesh;
33 |
34 | // 頂点インデックス取得
35 | indices = transform.FindChild("base").GetComponent().targetIndices;
36 |
37 | skin_script = GetSkinScripts(); // 表情に付いているスクリプトを取得
38 |
39 | // 元頂点配列に入れていく
40 | source = new Vector3[indices.Length];
41 | for (int i = 0; i < indices.Length; i++)
42 | source[i] = mesh.vertices[indices[i]];
43 |
44 | // 合成するベクトル配列
45 | composite = new Vector3[indices.Length];
46 | for (int i = 0; i < indices.Length; i++)
47 | composite[i] = Vector3.zero;
48 |
49 | // 前のフレームの合成ベクトルはここでコピー
50 | prev_comp = new Vector3[indices.Length];
51 | Array.Copy(composite, prev_comp, indices.Length);
52 |
53 | }
54 |
55 | void Start()
56 | {
57 | Init();
58 | }
59 |
60 | // SkinScriptの配列を子供の表情から探して拾ってくる
61 | MMDSkinsScript[] GetSkinScripts()
62 | {
63 | // 表情のスクリプトを拾ってくる
64 | var scripts = new MMDSkinsScript[transform.GetChildCount()];
65 | for (int i = 0; i < scripts.Length; i++)
66 | scripts[i] = transform.GetChild(i).GetComponent();
67 |
68 | return scripts;
69 | }
70 |
71 | void Update()
72 | {
73 | var vtxs = mesh.vertices; // 配列を受け入れ
74 |
75 | // 表情ごとに計算する
76 | foreach (var s in this.skin_script)
77 | {
78 | s.Compute(composite);
79 | //bool computed_morph = s.Compute(composite);
80 | //if (computed_morph)
81 | //{
82 | // // モーフした表情の種類によってカウント
83 | // switch (s.skinType)
84 | // {
85 | // case MMDSkinsScript.SkinType.Eye:
86 | // eye_count++;
87 | // break;
88 |
89 | // case MMDSkinsScript.SkinType.EyeBrow:
90 | // eye_brow_count++;
91 | // break;
92 |
93 | // case MMDSkinsScript.SkinType.Lip:
94 | // lip_count++;
95 | // break;
96 |
97 | // case MMDSkinsScript.SkinType.Other:
98 | // other_count++;
99 | // break;
100 | // }
101 | //}
102 | }
103 |
104 | // ここで計算結果を入れていく
105 | for (int i = 0; i < indices.Length; i++)
106 | {
107 | if (prev_comp[i] != composite[i])
108 | {
109 | vtxs[indices[i]] = source[i] + composite[i];
110 | }
111 | }
112 | Array.Copy(composite, prev_comp, indices.Length);
113 |
114 | mesh.vertices = vtxs; // ここで反映
115 | /*
116 | * ノート
117 | * どうやらsharedMeshはAssetを共有しているため
118 | * シーン内に複数ある時に変形すると全体が変形してしまう
119 | */
120 | }
121 |
122 | void OnApplicationQuit()
123 | {
124 | // アプリ終了時に頂点を元に戻す
125 | var vtxs = mesh.vertices;
126 | for (int i = 0; i < indices.Length; i++)
127 | {
128 | vtxs[indices[i]] = source[i];
129 | }
130 | mesh.vertices = vtxs;
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/Assets/Resources/IK/CCDIKSolver.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | public class CCDIKSolver : MonoBehaviour
6 | {
7 | /* MEMO
8 | * --------------------
9 | * IKボーンにこのスクリプトを適用して、Solveを呼び出す。
10 | * target = ターゲット(IKボーンを目指すボーン)
11 | * chains = IK影響下ボーン
12 | * --------------------
13 | */
14 |
15 | // Target
16 | // IKボーンを目指すボーン
17 | public Transform target;
18 |
19 | // Loop count
20 | // ushortだとInspectorに出ない
21 | public int iterations;
22 |
23 | // rad limit
24 | // "単位角"
25 | public float controll_weight;
26 |
27 | // IK影響下ボーン
28 | public Transform[] chains;
29 |
30 | // レイの描画(デバッグ用)
31 | public bool drawRay = false;
32 |
33 | // 計算
34 | void Solve()
35 | {
36 | // ループ回数で計算していく
37 | for (int tries = 0, _mt = iterations; tries < _mt; tries++)
38 | {
39 | // IK影響下ボーンごとに
40 | for (int _i = 0, _m = chains.Length; _i < _m; _i++)
41 | {
42 | var bone = chains[_i];
43 | var bonePos = bone.position;
44 |
45 | // エフェクタ設定
46 | var effectorPos = target.position;
47 | var effectorDirection = (effectorPos - bonePos);
48 |
49 | // ターゲット設定
50 | var targetDirection = (transform.position - bonePos);
51 |
52 | // 線を引いといてみる
53 | if (drawRay)
54 | {
55 | Debug.DrawRay(bonePos, effectorDirection, Color.green);
56 | Debug.DrawRay(bonePos, targetDirection, Color.red);
57 | }
58 |
59 | // 内積
60 | effectorDirection = effectorDirection.normalized;
61 | targetDirection = targetDirection.normalized;
62 | float rotateDot = Vector3.Dot(effectorDirection, targetDirection);
63 |
64 | // 角度算出。
65 | // controll_weightによる一回の計算での制限
66 | float rotateAngle = Mathf.Acos(rotateDot);
67 | if (float.IsNaN(rotateAngle)) continue;
68 | var limit = 4 * controll_weight * (_i + 1);
69 | if (rotateAngle > limit)
70 | rotateAngle = limit;
71 | if (rotateAngle < -limit)
72 | rotateAngle = -limit;
73 | rotateAngle *= Mathf.Rad2Deg;
74 |
75 | // 外積で回転軸算出
76 | // lockDirectionを見て、回転制限 => 一旦なし
77 | var rotateAxis = Vector3.Cross(effectorDirection, targetDirection).normalized;
78 |
79 | // 大丈夫そうなら
80 | if (float.IsNaN(rotateAxis.x) || float.IsNaN(rotateAxis.y) || float.IsNaN(rotateAxis.z))
81 | continue;
82 |
83 | // 回す
84 | var rotate = Quaternion.AngleAxis(rotateAngle, rotateAxis);
85 | bone.rotation = rotate * bone.rotation;
86 |
87 | // 角度制限
88 | limitter(bone);
89 | }
90 | }
91 | }
92 |
93 | // 角度制限
94 | void limitter(Transform bone)
95 | {
96 | // 足首のZ回転
97 | if (bone.name.Contains("足首"))
98 | {
99 | var vv = bone.localEulerAngles;
100 | vv.z = 0;
101 | bone.localRotation = Quaternion.Euler(vv);
102 | return;
103 | }
104 |
105 | // 本来なら設定値に基づいてやるけど、とりあえず膝限定
106 | if (!bone.name.Contains("ひざ"))
107 | return;
108 |
109 | // オイラー角を取得
110 | var v = bone.localEulerAngles;
111 |
112 | // y,z回転を無効化
113 | if (adjust_rot(v.y) == adjust_rot(v.z))
114 | {
115 | v.y = adjust_rot(v.y);
116 | v.z = adjust_rot(v.z);
117 | }
118 |
119 | // 逆に曲がらないように、制限してあげる
120 | if (v.x < 90 && v.x > 2 && ((v.y == 0 && v.z == 0) || (v.y == 180 && v.z == 180)))
121 | v.x = 360 - v.x * 0.99f;
122 |
123 | bone.localRotation = Quaternion.Euler(v);
124 | }
125 |
126 | // 0か180か近い方に固定
127 | int adjust_rot(float n)
128 | {
129 | if (Mathf.Abs(n) > Mathf.Abs(180 - n) && Mathf.Abs(360 - n) > Mathf.Abs(180 - n))
130 | return 180;
131 | else
132 | return 0;
133 | }
134 |
135 | // MMDEngine.cs の方でIKボーン全体も保持してるので、
136 | // そっちからSolve()を呼び出している。
137 | //--------------------
138 | //void LateUpdate()
139 | //{
140 | // Solve();
141 | //}
142 | }
143 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/PMDLoaderScript.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using UnityEngine;
3 | using UnityEditor;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using System.IO;
7 | using System.Text;
8 |
9 | public class PMDLoaderScript {
10 |
11 | //--------------------------------------------------------------------------------
12 | // ファイル読み込み
13 |
14 | GameObject obj;
15 | public Object pmd;
16 | public bool rigidFlag; // 物理や剛体のオン・オフ
17 | public MMD.PMD.ShaderType shader_type;
18 | public bool use_mecanim;
19 | public bool use_ik;
20 |
21 | FileStream fst; // テスト用
22 |
23 | BinaryReader LoadFile(Object obj, string path) {
24 | FileStream f = new FileStream(path, FileMode.Open, FileAccess.Read);
25 | this.fst = f;
26 | BinaryReader r = new BinaryReader(f);
27 | return r;
28 | }
29 |
30 | // PMDファイル読み込み
31 | void LoadPMDFile() {
32 | string path = AssetDatabase.GetAssetPath(this.pmd);
33 | BinaryReader bin = this.LoadFile(this.pmd, path);
34 | MMD.PMD.PMDFormat format = MMD.PMD.PMDLoader.Load(bin, obj, path);
35 | BurnUnityFormatForPMD(format);
36 | bin.Close();
37 | }
38 |
39 | // Use this for initialization
40 | public PMDLoaderScript (Object pmdFile, MMD.PMD.ShaderType shader_type, bool rigidFlag, bool use_mecanim, bool use_ik) {
41 | this.pmd = pmdFile;
42 | this.rigidFlag = rigidFlag;
43 | this.shader_type = shader_type;
44 | this.use_mecanim = use_mecanim;
45 | this.use_ik = use_ik;
46 |
47 | if (this.pmd != null) {
48 | LoadPMDFile();
49 | }
50 | }
51 |
52 | //--------------------------------------------------------------------------------
53 | // PMDファイルの読み込み
54 |
55 | Mesh mesh;
56 | Material[] materials;
57 | GameObject[] bones;
58 | GameObject[] rigids;
59 |
60 | void CreatePrefab(MMD.PMD.PMDFormat format)
61 | {
62 | Object prefab = PrefabUtility.CreateEmptyPrefab(format.folder + "/" + format.name + ".prefab");
63 | #if UNITY_4_0 || UNITY_3_5
64 | // 4.0からPrefabUtilityを使えとのこと
65 | // 3.5.6f4でもコンソールで警告がでていたので3.5もこっち
66 | PrefabUtility.ReplacePrefab(format.caller, prefab);
67 | #elif UNITY_3_4
68 | EditorUtility.ReplacePrefab(format.caller, prefab);
69 | #endif
70 | }
71 |
72 | void EndOfScript(MMD.PMD.PMDFormat format)
73 | {
74 | AssetDatabase.Refresh();
75 |
76 | this.mesh = null;
77 | this.materials = null;
78 | this.bones = null;
79 | this.pmd = null;
80 | }
81 |
82 | // PMDファイルをUnity形式に変換
83 | void BurnUnityFormatForPMD(MMD.PMD.PMDFormat format) {
84 | format.fst = this.fst;
85 | obj = new GameObject(format.name);
86 | format.caller = obj;
87 | format.shader_type = this.shader_type;
88 |
89 | MMD.PMD.PMDConverter conv = new MMD.PMD.PMDConverter();
90 |
91 | this.mesh = conv.CreateMesh(format); // メッシュの生成・設定
92 | this.materials = conv.CreateMaterials(format); // マテリアルの生成・設定
93 | this.bones = conv.CreateBones(format); // ボーンの生成・設定
94 |
95 | // バインドポーズの作成
96 | conv.BuildingBindpose(format, this.mesh, this.materials, this.bones);
97 | obj.AddComponent(); // アニメーションを追加
98 |
99 | MMDEngine engine = obj.AddComponent();
100 |
101 | // IKの登録
102 | if(this.use_ik)
103 | engine.ik_list = conv.EntryIKSolver(format, this.bones);
104 |
105 | // 剛体関連
106 | if (this.rigidFlag)
107 | {
108 | try
109 | {
110 | this.rigids = conv.CreateRigids(format, bones);
111 | conv.AssignRigidbodyToBone(format, this.bones, this.rigids);
112 | conv.SetRigidsSettings(format, this.bones, this.rigids);
113 | conv.SettingJointComponent(format, this.bones, this.rigids);
114 |
115 | // 非衝突グループ
116 | List[] ignoreGroups = conv.SettingIgnoreRigidGroups(format, this.rigids);
117 | int[] groupTarget = conv.GetRigidbodyGroupTargets(format, rigids);
118 |
119 | MMDEngine.Initialize(engine, groupTarget, ignoreGroups, this.rigids);
120 | }
121 | catch { }
122 | }
123 |
124 | #if UNITY_4_0
125 | AvatarSettingScript avt_setting = new AvatarSettingScript(format.caller);
126 | avt_setting.SettingAvatar();
127 | #endif
128 |
129 | var window = LoadedWindow.Init();
130 | window.Text = format.head.comment;
131 |
132 | CreatePrefab(format);
133 | EndOfScript(format);
134 | }
135 | }
136 | #endif
--------------------------------------------------------------------------------
/Assets/XFileImporter/Private/XFileConverter.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Text.RegularExpressions;
6 | using System;
7 |
8 | #if UNITY_EDITOR
9 | using UnityEditor;
10 |
11 | namespace xfile {
12 | public class XFileConverter {
13 | string filePath;
14 | string folderPath;
15 | string fileName;
16 | string localPath;
17 | StreamReader sr;
18 |
19 | MeshSection meshSection;
20 | MaterialList matList;
21 |
22 | // フォルダのパス取得
23 | // 最後にスラッシュアリ
24 | private string GetFolderPath() {
25 | string[] str = filePath.Split('/');
26 | string result = "";
27 | for (int i = 0; i < str.Length-1; i++)
28 | result += str[i] + "/";
29 | return result;
30 | }
31 |
32 | private string GetFileName() {
33 | string[] str = filePath.Split('/');
34 | return str[str.Length-1];
35 | }
36 |
37 | // 1行1行解釈してクラスを作ってく
38 | private void Parser(string s) {
39 | if (Regex.IsMatch(s, "Material ")) {
40 | s = Regex.Replace(s, "Material ", ""); // マッチさせる前に邪魔なのは消す
41 | Match m = Regex.Match(s, "\\w+");
42 | matList.AddMaterial(sr, m.Value);
43 | } else if (Regex.IsMatch(s, "Mesh ")) {
44 | s = Regex.Replace(s, "Mesh ", "");
45 | Match m = Regex.Match(s, "\\w+");
46 | Debug.Log(m.Value);
47 | meshSection = new MeshSection(sr, m.Value);
48 | }
49 | }
50 |
51 | private void CreateFolder() {
52 | string buf = folderPath;
53 | buf.Replace("/", "\\");
54 | System.IO.Directory.CreateDirectory(buf + "Materials"); // とりあえず、マテリアルのフォルダ作成
55 | }
56 |
57 | public XFileConverter(UnityEngine.Object xfile) {
58 | filePath = UnityEditor.AssetDatabase.GetAssetPath(xfile);
59 | folderPath = GetFolderPath();
60 | fileName = GetFileName();
61 |
62 | CreateFolder();
63 | sr = new StreamReader(filePath);
64 | matList = new MaterialList(sr);
65 |
66 | string str;
67 | while (!sr.EndOfStream) {
68 | Parser(str = sr.ReadLine());
69 | }
70 | }
71 |
72 | private void EntryVerticesForMesh(Mesh mesh) {
73 | if (meshSection.vtxList.vertex.Length > 65000)
74 | throw new Exception("A mesh may not have more than 65000 vertices.");
75 | mesh.vertices = meshSection.vtxList.vertex;
76 | }
77 |
78 | private void EntryUVForMesh(Mesh mesh) {
79 | mesh.uv = meshSection.uvList.uvs;
80 | }
81 |
82 | // サブメッシュの登録
83 | private void EntrySubMeshForMesh(Mesh mesh) {
84 | MeshList meshList = meshSection.meshList;
85 | MeshMaterialList matList = meshSection.matList;
86 | mesh.subMeshCount = matList.MaterialCount; // サブメッシュの数をここで設定
87 |
88 | /*
89 | for (int i = 0; i < meshList.MeshCount; i++) {
90 | mesh.SetTriangles(meshList.mesh[i], matList.materialIndex[i]);
91 | }*/
92 |
93 | for (int i = 0; i < matList.MaterialCount; i++) {
94 | List submesh = new List();
95 | for (int j = 0; j < meshList.MeshCount; j++) {
96 | if (i == matList.materialIndex[j]) {
97 | foreach (int num in meshList.mesh[j])
98 | submesh.Add(num);
99 | }
100 | }
101 | int[] buf = new int[submesh.Count];
102 | submesh.CopyTo(buf);
103 | mesh.SetTriangles(buf, i);
104 | }
105 | }
106 |
107 | public UnityEngine.Object CreatePrefab() {
108 | string path = folderPath + fileName.Split('.')[0] + ".prefab";
109 | return EditorUtility.CreateEmptyPrefab(path);
110 | }
111 |
112 | private void EntryNormal(Mesh mesh) {
113 | mesh.normals = meshSection.normList.normals;
114 | }
115 |
116 | // メッシュの生成
117 | public Mesh CreateMesh() {
118 | Mesh mesh = new Mesh();
119 | EntryVerticesForMesh(mesh);
120 | EntryUVForMesh(mesh);
121 | EntrySubMeshForMesh(mesh);
122 | EntryNormal(mesh);
123 | AssetDatabase.CreateAsset(mesh, folderPath + fileName.Split('.')[0] + ".asset");
124 | return mesh;
125 | }
126 |
127 | // マテリアルの登録
128 | private UnityEngine.Material EntryMaterial(int i) {
129 | UnityEngine.Material mat = new UnityEngine.Material(Shader.Find("VertexLit"));
130 | Material source = matList.materials[i];
131 | Texture tex = null;
132 |
133 | // テクスチャを貼る
134 | if (source.TextureFileName != "") {
135 | tex = AssetDatabase.LoadAssetAtPath(folderPath + source.TextureFileName, typeof(Texture)) as Texture;
136 | mat.mainTexture = tex;
137 | mat.SetTextureScale("_MainTex", new Vector2(1, -1));
138 | }
139 |
140 | mat.color = source.DiffuseColor;
141 | mat.SetColor("_SpecColor", source.SpecularColor);
142 | mat.SetColor("_Emission", source.EmissionColor);
143 | mat.SetFloat("_Shiness", source.Specularity);
144 | mat.name = this.fileName + "_" + source.Name;
145 |
146 | AssetDatabase.CreateAsset(mat, folderPath + "Materials/" + mat.name + ".asset");
147 | return mat;
148 | }
149 |
150 | public UnityEngine.Material[] CreateMaterials() {
151 | UnityEngine.Material[] material = new UnityEngine.Material[matList.MaterialCount];
152 | for (int i = 0; i < matList.MaterialCount; i++) {
153 | material[i] = EntryMaterial(i);
154 | }
155 | return material;
156 | }
157 |
158 | public void ReplacePrefab(UnityEngine.Object prefab, Mesh mesh, UnityEngine.Material[] materials) {
159 | GameObject obj = new GameObject(fileName.Split('.')[0]);
160 | MeshFilter filter = obj.AddComponent();
161 | filter.mesh = mesh;
162 | MeshRenderer mren = obj.AddComponent();
163 | mren.sharedMaterials = materials;
164 | EditorUtility.ReplacePrefab(obj, prefab);
165 | }
166 | }
167 | }
168 | #endif
--------------------------------------------------------------------------------
/Assets/XFileImporter/Private/XFileFormat.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 | using System.IO;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text.RegularExpressions;
7 |
8 | namespace xfile {
9 |
10 | public class Converter {
11 | static public string[] InvalidCheck(StreamReader s, int checkNum, char split) {
12 | string[] str = s.ReadLine().Split(split);
13 | if (str.Length < checkNum) {
14 | str = s.ReadLine().Split(split);
15 | if (str.Length < checkNum) Debug.LogError("Invalid Stream?");
16 | }
17 | return str;
18 | }
19 |
20 | static public string[] InvalidCheck(StreamReader s, int checkNum) {
21 | return InvalidCheck(s, checkNum, ';');
22 | }
23 |
24 | static public Vector3 ToVector3(StreamReader s) {
25 | Vector3 v = new Vector3();
26 | string[] str = InvalidCheck(s, 3);
27 | v.x = Convert.ToSingle(str[0]);
28 | v.y = Convert.ToSingle(str[1]);
29 | v.z = Convert.ToSingle(str[2]);
30 | return v;
31 | }
32 |
33 | static public Vector2 ToVector2(StreamReader s) {
34 | Vector2 v = new Vector2();
35 | string[] str = s.ReadLine().Split(',');
36 | v.x = Convert.ToSingle(str[0]);
37 | str = str[1].Split(';');
38 | v.y = Convert.ToSingle(str[0]);
39 | return v;
40 | }
41 |
42 | static public int ToInt(StreamReader s) {
43 | return ToInt(s, ';');
44 | }
45 |
46 | static public int ToInt(StreamReader s, char split) {
47 | string[] str = InvalidCheck(s, 1, split);
48 | int num = 0;
49 | try {
50 | num = Convert.ToInt32(str[0]);
51 | }
52 | catch (Exception e) {
53 | str = str[0].Split(';');
54 | num = Convert.ToInt32(str[0]);
55 | }
56 | return num;
57 | }
58 |
59 | static public float ToFloat(StreamReader s) {
60 | string[] str = InvalidCheck(s, 1);
61 | return Convert.ToSingle(str[0]);
62 | }
63 |
64 | static public Color ToColor(StreamReader s) {
65 | Color c = new Color();
66 | string[] str = InvalidCheck(s, 4);
67 | c.r = Convert.ToSingle(str[0]);
68 | c.g = Convert.ToSingle(str[1]);
69 | c.b = Convert.ToSingle(str[2]);
70 | c.a = Convert.ToSingle(str[3]);
71 | return c;
72 | }
73 |
74 | static public Color ToColor(StreamReader s, float alpha) {
75 | Color c = new Color();
76 | string[] str = InvalidCheck(s, 3);
77 | c.r = Convert.ToSingle(str[0]);
78 | c.g = Convert.ToSingle(str[1]);
79 | c.b = Convert.ToSingle(str[2]);
80 | c.a = alpha;
81 | return c;
82 | }
83 | }
84 |
85 | ///
86 | /// 頂点リスト
87 | ///
88 | public class VertexList {
89 | private int vertexCount;
90 | public int VertexCount {
91 | get { return vertexCount; }
92 | }
93 |
94 | public Vector3[] vertex;
95 |
96 | public VertexList(StreamReader s) {
97 | vertexCount = Converter.ToInt(s);
98 | Debug.Log("VertexList.Length: " + vertexCount);
99 |
100 | vertex = new Vector3[vertexCount];
101 | for (int i = 0; i < vertexCount; i++)
102 | vertex[i] = Converter.ToVector3(s);
103 | }
104 | }
105 |
106 | ///
107 | /// メッシュリスト
108 | /// ポリゴンを構成する頂点インデックスの集合
109 | ///
110 | public class MeshList {
111 | private int meshCount;
112 | public int MeshCount {
113 | get { return meshCount; }
114 | }
115 |
116 | public List mesh;
117 |
118 | public MeshList(StreamReader s, VertexList l) {
119 | meshCount = Converter.ToInt(s);
120 | Debug.Log("MeshList.Length: " + meshCount);
121 |
122 | // 頂点インデックスの保存
123 | mesh = new List();
124 | for (int i = 0; i < meshCount; i++) {
125 | // インデックスの抽出
126 | string[] str = s.ReadLine().Split(';');
127 | mesh.Add(new int[Convert.ToInt32(str[0])]);
128 |
129 | // 数値の抽出
130 | str = str[1].Split(',');
131 | for (int j = 0; j < mesh[i].Length; j++) {
132 | try {
133 | mesh[i][j] = Convert.ToInt32(str[j]);
134 | } catch (Exception e) {
135 | Debug.Log("Invalid MeshList: " + i);
136 | }
137 | }
138 | }
139 | }
140 | }
141 |
142 | ///
143 | /// 頂点マテリアルリスト
144 | /// マテリアルを利用する頂点インデックスの集合
145 | ///
146 | public class MeshMaterialList {
147 | int materialCount;
148 | public int MaterialCount {
149 | get { return materialCount; }
150 | }
151 |
152 | int polygonCount;
153 | public int PolygonCount {
154 | get { return polygonCount; }
155 | }
156 |
157 | public int[] materialIndex;
158 | public string[] materialReferens;
159 |
160 | public MeshMaterialList(StreamReader s) {
161 | materialCount = Converter.ToInt(s);
162 | Debug.Log("MeshMaterialList.Length: " + materialCount);
163 | polygonCount = Converter.ToInt(s);
164 |
165 | materialIndex = new int[polygonCount];
166 | for (int i = 0; i < polygonCount; i++) {
167 | materialIndex[i] = Converter.ToInt(s, ',');
168 | }
169 |
170 | materialReferens = new string[materialCount];
171 | for (int i = 0; i < materialCount; i++) {
172 | string[] str = s.ReadLine().Split('{');
173 | str = str[1].Split('}');
174 | materialReferens[i] = str[0];
175 | }
176 |
177 | string buf = s.ReadLine();
178 | if (!Regex.IsMatch(buf, "}"))
179 | throw new Exception("MeshMaterialList End?: " + buf);
180 | }
181 | }
182 |
183 | ///
184 | /// 法線リスト
185 | ///
186 | public class MeshNormalList {
187 | int normalCount;
188 | public int NormalCount {
189 | get { return normalCount; }
190 | }
191 |
192 | public int NormalIndexCount {
193 | get { return normalIndex.Count; }
194 | }
195 |
196 | public Vector3[] normals; // 法線データ
197 | public List normalIndex; // どの頂点がどの法線データを参照しているか
198 |
199 | public MeshNormalList(StreamReader s) {
200 | normalCount = Converter.ToInt(s);
201 | Debug.Log("MeshNormalList.Length: " + normalCount);
202 |
203 | // 法線の読み込み
204 | normals = new Vector3[normalCount];
205 | for (int i = 0; i < normalCount; i++) {
206 | normals[i] = Converter.ToVector3(s);
207 | }
208 |
209 | // インデックスの読み込み
210 | normalIndex = new List();
211 | string read = s.ReadLine();
212 | read = s.ReadLine(); // カウントの読み捨て
213 | while (!Regex.IsMatch(read, "}")) {
214 | string[] str = read.Split(';');
215 | int[] buf = new int[Convert.ToInt32(str[0])];
216 | str = str[1].Split(',');
217 | for (int i = 0; i < buf.Length; i++) {
218 | buf[i] = Convert.ToInt32(str[i]);
219 | }
220 | normalIndex.Add(buf);
221 | read = s.ReadLine();
222 | }
223 | Debug.Log("MeshNormalIndex.Length: " + normalIndex.Count);
224 | }
225 | }
226 |
227 | ///
228 | /// UVリスト
229 | ///
230 | public class MeshTextureCoordList {
231 | int uvCount;
232 | public int UVCount {
233 | get { return uvCount; }
234 | }
235 |
236 | public Vector2[] uvs;
237 |
238 | public MeshTextureCoordList(StreamReader s) {
239 | uvCount = Converter.ToInt(s);
240 | Debug.Log("MeshTextureCoordList.Length: " + uvCount);
241 |
242 | uvs = new Vector2[uvCount];
243 | for (int i = 0; i < uvCount; i++) {
244 | uvs[i] = Converter.ToVector2(s);
245 | }
246 | s.ReadLine();
247 | }
248 | }
249 |
250 | public class MeshSection {
251 | private string name;
252 | public string Name {
253 | get { return name; }
254 | }
255 |
256 | public MeshList meshList;
257 | public VertexList vtxList;
258 | public MeshMaterialList matList;
259 | public MeshNormalList normList;
260 | public MeshTextureCoordList uvList;
261 |
262 | public MeshSection(StreamReader sr, string name) {
263 | this.name = name;
264 | vtxList = new VertexList(sr);
265 | meshList = new MeshList(sr, vtxList);
266 |
267 | // 他の何かがある場合
268 | // 閉じるまで繰り返し
269 | string read = sr.ReadLine();
270 | while (!Regex.IsMatch(read, "}")) {
271 | if (Regex.IsMatch(read, "MeshMaterialList") ){
272 | matList = new MeshMaterialList(sr);
273 | } else if (Regex.IsMatch(read, "MeshNormals")) {
274 | normList = new MeshNormalList(sr);
275 | } else if (Regex.IsMatch(read, "MeshTextureCoords")) {
276 | uvList = new MeshTextureCoordList(sr);
277 | }
278 | read = sr.ReadLine();
279 | }
280 | }
281 | }
282 |
283 | public class MaterialList {
284 | public int MaterialCount {
285 | get { return materials.Count; }
286 | }
287 |
288 | public List materials;
289 |
290 | public MaterialList(StreamReader s) {
291 | materials = new List();
292 | }
293 |
294 | public void AddMaterial(StreamReader s, string name) {
295 | materials.Add(new Material(s, name));
296 | }
297 | }
298 |
299 | ///
300 | /// マテリアル
301 | ///
302 | public class Material {
303 | private string name;
304 | public string Name {
305 | get { return name; }
306 | }
307 |
308 | private Color diffuseColor;
309 | public Color DiffuseColor {
310 | get { return diffuseColor; }
311 | }
312 |
313 | private float specularity;
314 | public float Specularity {
315 | get { return specularity; }
316 | }
317 |
318 | private Color specularColor;
319 | public Color SpecularColor {
320 | get { return specularColor; }
321 | }
322 |
323 | private Color emissionColor;
324 | public Color EmissionColor {
325 | get { return emissionColor; }
326 | }
327 |
328 | private string textureFileName;
329 | public string TextureFileName {
330 | get { return textureFileName; }
331 | }
332 |
333 | public Material(StreamReader s, string name) {
334 | this.name = name;
335 | diffuseColor = Converter.ToColor(s);
336 | specularity = Converter.ToFloat(s);
337 | specularColor = Converter.ToColor(s, 1.0f);
338 | emissionColor = Converter.ToColor(s, 1.0f);
339 | string str = s.ReadLine();
340 | if (Regex.IsMatch(str, "TextureFilename")) {
341 | string[] buf = str.Split('"');
342 | textureFileName = buf[1];
343 | } else {
344 | textureFileName = "";
345 | }
346 | }
347 | }
348 | }
--------------------------------------------------------------------------------
/Assets/Resources/PMDMaterial/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/Assets/MMDLoader/Private/MMDFormat.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System;
4 | using System.IO;
5 | using UnityEngine;
6 | using System.Text;
7 |
8 | // Reference URL:
9 | // http://blog.goo.ne.jp/torisu_tetosuki/e/209ad341d3ece2b1b4df24abf619d6e4
10 | // http://mikudan.blog120.fc2.com/blog-entry-280.html
11 |
12 | namespace MMD
13 | {
14 | public class Format : IComparable
15 | {
16 | // ShiftJISからUTF-8に変換してstringで返す
17 | protected string ConvertByteToString(byte[] bytes)
18 | {
19 | // パディングの消去, 文字を詰める
20 | if (bytes[0] == 0) return "";
21 | int count;
22 | for (count = 0; count < bytes.Length; count++) if (bytes[count] == 0) break;
23 | byte[] buf = new byte[count]; // NULL文字を含めるとうまく行かない
24 | for (int i = 0; i < count; i++) {
25 | buf[i] = bytes[i];
26 | }
27 |
28 | #if UNITY_STANDALONE_OSX
29 | buf = Encoding.Convert(Encoding.GetEncoding(932), Encoding.UTF8, buf);
30 | #else
31 | buf = Encoding.Convert(Encoding.GetEncoding(0), Encoding.UTF8, buf);
32 | #endif
33 | return Encoding.UTF8.GetString(buf).Replace("\n", "");
34 | }
35 |
36 | protected float[] ReadSingles(BinaryReader bin, uint count)
37 | {
38 | float[] result = new float[count];
39 | for (int i = 0; i < count; i++)
40 | {
41 | result[i] = bin.ReadSingle();
42 | }
43 | return result;
44 | }
45 |
46 | protected Vector3 ReadSinglesToVector3(BinaryReader bin)
47 | {
48 | const int count = 3;
49 | float[] result = new float[count];
50 | for (int i = 0; i < count; i++)
51 | {
52 | result[i] = bin.ReadSingle();
53 | }
54 | return new Vector3(result[0], result[1], result[2]);
55 | }
56 |
57 | protected Vector2 ReadSinglesToVector2(BinaryReader bin)
58 | {
59 | const int count = 2;
60 | float[] result = new float[count];
61 | for (int i = 0; i < count; i++)
62 | {
63 | result[i] = bin.ReadSingle();
64 | }
65 | return new Vector2(result[0], result[1]);
66 | }
67 |
68 | protected Color ReadSinglesToColor(BinaryReader bin)
69 | {
70 | const int count = 4;
71 | float[] result = new float[count];
72 | for (int i = 0; i < count; i++)
73 | {
74 | result[i] = bin.ReadSingle();
75 | }
76 | return new Color(result[0], result[1], result[2], result[3]);
77 | }
78 |
79 | protected Color ReadSinglesToColor(BinaryReader bin, float fix_alpha)
80 | {
81 | const int count = 3;
82 | float[] result = new float[count];
83 | for (int i = 0; i < count; i++)
84 | {
85 | result[i] = bin.ReadSingle();
86 | }
87 | return new Color(result[0], result[1], result[2], fix_alpha);
88 | }
89 |
90 | protected uint[] ReadUInt32s(BinaryReader bin, uint count)
91 | {
92 | uint[] result = new uint[count];
93 | for (int i = 0; i < count; i++)
94 | {
95 | result[i] = bin.ReadUInt32();
96 | }
97 | return result;
98 | }
99 |
100 | protected ushort[] ReadUInt16s(BinaryReader bin, uint count)
101 | {
102 | ushort[] result = new ushort[count];
103 | for (uint i = 0; i < count; i++)
104 | {
105 | result[i] = bin.ReadUInt16();
106 | }
107 | return result;
108 | }
109 |
110 | protected Quaternion ReadSinglesToQuaternion(BinaryReader bin)
111 | {
112 | const int count = 4;
113 | float[] result = new float[count];
114 | for (int i = 0; i < count; i++)
115 | {
116 | result[i] = bin.ReadSingle();
117 | }
118 | return new Quaternion(result[0], result[1], result[2], result[3]);
119 | }
120 |
121 | // ソート用の何か
122 | protected int count = 0;
123 | public int CompareTo(object obj)
124 | {
125 | return count - ((Format)obj).count;
126 | }
127 | }
128 |
129 | namespace PMD
130 | {
131 | // PMDファイルの読み込みクラス
132 | public class PMDLoader
133 | {
134 | public static PMDFormat Load(BinaryReader bin, GameObject caller, string path)
135 | {
136 | return new PMDFormat(bin, caller, path);
137 | }
138 | }
139 |
140 | ///
141 | /// シェーダの種類
142 | ///
143 | public enum ShaderType
144 | {
145 | Default, /// Unityのデフォルトシェーダ
146 | HalfLambert, /// もやっとしたLambertっぽくなる
147 | MMDShader /// MMDっぽいシェーダ
148 | }
149 |
150 | // PMDのフォーマットクラス
151 | public class PMDFormat : MMD.Format
152 | {
153 | public string path; // フルパス
154 | public string name; // 拡張子とパス抜きのファイルの名前
155 | public string folder; // ファイル名抜きのパス
156 | public GameObject caller; // MMDLoaderScirptを適用したオブジェクト
157 | public ShaderType shader_type; // シェーダの種類
158 |
159 | public FileStream fst; // テスト用
160 |
161 | public Header head;
162 | public VertexList vertex_list;
163 | public FaceVertexList face_vertex_list;
164 | public MaterialList material_list;
165 | public BoneList bone_list;
166 | public IKList ik_list;
167 | public SkinList skin_list;
168 | public SkinNameList skin_name_list;
169 | public BoneNameList bone_name_list;
170 | public BoneDisplayList bone_display_list;
171 | public EnglishHeader eg_head;
172 | public EnglishBoneNameList eg_bone_name_list;
173 | public EnglishSkinNameList eg_skin_name_list;
174 | public EnglishBoneDisplayList eg_bone_display_list;
175 | public ToonTextureList toon_texture_list;
176 | public RigidbodyList rigidbody_list;
177 | public RigidbodyJointList rigidbody_joint_list;
178 |
179 | int read_count = 0;
180 |
181 | void EntryPathes(string path)
182 | {
183 | this.path = path;
184 | string[] buf = path.Split('/');
185 | this.name = buf[buf.Length-1];
186 | this.name = name.Split('.')[0]; // .pmdを抜かす
187 |
188 | // PMDが格納されているフォルダ
189 | this.folder = buf[0];
190 | for (int i = 1; i < buf.Length-1; i++)
191 | this.folder += "/" + buf[i];
192 | }
193 |
194 | public PMDFormat(BinaryReader bin, GameObject caller, string path)
195 | {
196 | EntryPathes(path);
197 |
198 | this.caller = caller;
199 |
200 | try {
201 | this.head = new Header(bin);
202 | this.vertex_list = new VertexList(bin);
203 | this.face_vertex_list = new FaceVertexList(bin);
204 | this.material_list = new MaterialList(bin);
205 | this.bone_list = new BoneList(bin);
206 | this.ik_list = new IKList(bin); read_count++;
207 | this.skin_list = new SkinList(bin); read_count++;
208 | this.skin_name_list = new SkinNameList(bin);
209 | this.bone_name_list = new BoneNameList(bin);
210 | this.bone_display_list = new BoneDisplayList(bin);
211 | this.eg_head = new EnglishHeader(bin);
212 | if (this.eg_head.english_name_compatibility != 0)
213 | {
214 | this.eg_bone_name_list = new EnglishBoneNameList(bin, bone_list.bone_count);
215 | this.eg_skin_name_list = new EnglishSkinNameList(bin, skin_list.skin_count);
216 | this.eg_bone_display_list = new EnglishBoneDisplayList(bin, bone_name_list.bone_disp_name_count);
217 | }
218 | this.toon_texture_list = new ToonTextureList(bin);
219 | this.rigidbody_list = new RigidbodyList(bin);
220 | this.rigidbody_joint_list = new RigidbodyJointList(bin);
221 | } catch {
222 | Debug.Log("Don't read full format");
223 | }
224 | }
225 |
226 | public class Header : MMD.Format
227 | {
228 | public byte[] magic; // "Pmd"
229 | public float version; // 00 00 80 3F == 1.00
230 | public string model_name;
231 | public string comment;
232 |
233 | public Header(BinaryReader bin)
234 | {
235 | this.magic = bin.ReadBytes(3);
236 | this.version = bin.ReadSingle();
237 | this.model_name = base.ConvertByteToString(bin.ReadBytes(20));
238 | this.comment = base.ConvertByteToString(bin.ReadBytes(256));
239 | }
240 | }
241 |
242 | public class VertexList : MMD.Format
243 | {
244 | public uint vert_count; // 頂点数
245 | public Vertex[] vertex; // 頂点データ(38bytes/頂点)
246 |
247 | public VertexList(BinaryReader bin)
248 | {
249 | this.vert_count = bin.ReadUInt32();
250 | this.vertex = new Vertex[vert_count];
251 | for (int i = 0; i < this.vert_count; i++)
252 | this.vertex[i] = new Vertex(bin);
253 | }
254 | }
255 |
256 | public class Vertex : MMD.Format
257 | {
258 | public Vector3 pos; // x, y, z // 座標
259 | public Vector3 normal_vec; // nx, ny, nz // 法線ベクトル
260 | public Vector2 uv; // u, v // UV座標 // MMDは頂点UV
261 | public ushort[] bone_num; // ボーン番号1、番号2 // モデル変形(頂点移動)時に影響
262 | public byte bone_weight; // ボーン1に与える影響度 // min:0 max:100 // ボーン2への影響度は、(100 - bone_weight)
263 | public byte edge_flag; // 0:通常、1:エッジ無効 // エッジ(輪郭)が有効の場合
264 |
265 | public Vertex(BinaryReader bin)
266 | {
267 | this.pos = base.ReadSinglesToVector3(bin);
268 | this.normal_vec = base.ReadSinglesToVector3(bin);
269 | this.uv = base.ReadSinglesToVector2(bin);
270 | this.bone_num = base.ReadUInt16s(bin, 2);
271 | this.bone_weight = bin.ReadByte();
272 | this.edge_flag = bin.ReadByte();
273 | }
274 | }
275 |
276 | // 面頂点リスト
277 | public class FaceVertexList : MMD.Format
278 | {
279 | public uint face_vert_count; // 頂点数
280 | public ushort[] face_vert_index; // 頂点番号(3個/面)
281 |
282 | public FaceVertexList(BinaryReader bin)
283 | {
284 | this.face_vert_count = bin.ReadUInt32();
285 | this.face_vert_index = base.ReadUInt16s(bin, this.face_vert_count);
286 | }
287 | }
288 |
289 | public class MaterialList : MMD.Format
290 | {
291 | public uint material_count; // 材質数
292 | public Material[] material; // 材質データ(70bytes/material)
293 |
294 | public MaterialList(BinaryReader bin)
295 | {
296 | this.material_count = bin.ReadUInt32();
297 | this.material = new Material[this.material_count];
298 | for (int i = 0; i < this.material_count; i++)
299 | this.material[i] = new Material(bin);
300 | }
301 | }
302 |
303 | public class Material : MMD.Format
304 | {
305 | public Color diffuse_color; // dr, dg, db // 減衰色
306 | public float alpha;
307 | public float specularity;
308 | public Color specular_color; // sr, sg, sb // 光沢色
309 | public Color mirror_color; // mr, mg, mb // 環境色(ambient)
310 | public byte toon_index; // toon??.bmp // 0.bmp:0xFF, 1(01).bmp:0x00 ・・・ 10.bmp:0x09
311 | public byte edge_flag; // 輪郭、影
312 | public uint face_vert_count; // 面頂点数 // インデックスに変換する場合は、材質0から順に加算
313 | public string texture_file_name; // テクスチャファイル名またはスフィアファイル名 // 20バイトぎりぎりまで使える(終端の0x00は無くても動く)
314 | public string sphere_map_name; // スフィアマップ用
315 |
316 | /*
317 | テクスチャファイル名またはスフィアファイル名の補足:
318 |
319 | テクスチャファイルにスフィアファイルを乗算または加算する場合
320 | (MMD 5.12以降)
321 | "テクスチャ名.bmp*スフィア名.sph" で乗算
322 | "テクスチャ名.bmp*スフィア名.spa" で加算
323 |
324 | (MMD 5.11)
325 | "テクスチャ名.bmp/スフィア名.sph" で乗算
326 |
327 | (MMD 5.09あたり-)
328 | "テクスチャ名.bmp" または "スフィア名.sph"
329 | */
330 |
331 | string CutTheUnknownDotSlash(string str)
332 | {
333 | string result = "";
334 | string[] buf = str.Split('/');
335 | if (buf[0] == ".") {
336 | result += buf[1];
337 | for (int i = 2; i < buf.Length; i++) {
338 | result += "/" + buf[i];
339 | }
340 | } else {
341 | result = str;
342 | }
343 | return result;
344 | }
345 |
346 | public Material(BinaryReader bin)
347 | {
348 | this.diffuse_color = base.ReadSinglesToColor(bin, 1);
349 | this.alpha = bin.ReadSingle();
350 | this.specularity = bin.ReadSingle();
351 | this.specular_color = base.ReadSinglesToColor(bin, 1);
352 | this.mirror_color = base.ReadSinglesToColor(bin, 1);
353 | this.toon_index = bin.ReadByte();
354 | this.edge_flag = bin.ReadByte();
355 | this.face_vert_count = bin.ReadUInt32();
356 |
357 | // テクスチャ名の抜き出し
358 | // スフィアマップも行う
359 | string buf = base.ConvertByteToString( bin.ReadBytes(20));
360 |
361 | //Debug by Wilfrem: テクスチャが無い場合を考慮していない
362 | //Debug by Wilfrem: テクスチャはfoo.bmp*bar.sphのパターンだけなのか? bar.sph*foo.bmpのパターンがあり得るのでは? 対策をしておくべき
363 | //Debug by GRGSIBERIA: スフィアマップとテクスチャが逆になる現象が発生したので修正
364 | //Debug by GRGSIBERIA: "./テクスチャ名"で始まるモデルで異常発生したので修正
365 | if(!string.IsNullOrEmpty(buf.Trim())){
366 | string[] textures = buf.Trim().Split('*');
367 | foreach(var tex in textures){
368 | string texNameEndAssignVar = "";
369 | string ext = Path.GetExtension(tex);
370 | if(ext == ".sph" || ext == ".spa"){
371 | this.sphere_map_name = tex;
372 | }/* else if (string.IsNullOrEmpty(tex)) {
373 | this.texture_file_name="";
374 | } */else {
375 | if (tex.Split('/')[0] == ".") {
376 | // テクスチャ名の後端に"./"があった場合の回避処理
377 | string[] texNameBuf = tex.Split('/');
378 | for (int i = 1; i < texNameBuf.Length-1; i++)
379 | texNameEndAssignVar += texNameBuf[i] + "/";
380 | texNameEndAssignVar += texNameBuf[texNameBuf.Length-1];
381 | } else {
382 | // 特に異常がない場合はそのまま代入
383 | texNameEndAssignVar = tex;
384 | }
385 | this.texture_file_name = texNameEndAssignVar;
386 | }
387 | }
388 | } else {
389 | this.sphere_map_name="";
390 | this.texture_file_name="";
391 | }
392 | if (string.IsNullOrEmpty(texture_file_name)) this.texture_file_name = "";
393 | }
394 | }
395 |
396 | public class BoneList : MMD.Format
397 | {
398 | public ushort bone_count; // ボーン数
399 | public Bone[] bone; // ボーンデータ(39bytes/bone)
400 |
401 | public BoneList(BinaryReader bin)
402 | {
403 | this.bone_count = bin.ReadUInt16();
404 | //Debug.Log("BoneCount:"+bone_count);
405 | this.bone = new Bone[this.bone_count];
406 | for (int i = 0; i < this.bone_count; i++)
407 | this.bone[i] = new Bone(bin);
408 | }
409 | }
410 |
411 | public class Bone : MMD.Format
412 | {
413 | public string bone_name; // ボーン名
414 | public ushort parent_bone_index; // 親ボーン番号(ない場合は0xFFFF)
415 | public ushort tail_pos_bone_index; // tail位置のボーン番号(チェーン末端の場合は0xFFFF) // 親:子は1:多なので、主に位置決め用
416 | public byte bone_type; // ボーンの種類
417 | public ushort ik_parent_bone_index; // IKボーン番号(影響IKボーン。ない場合は0)
418 | public Vector3 bone_head_pos; // x, y, z // ボーンのヘッドの位置
419 |
420 | /*
421 | ・ボーンの種類
422 | 0:回転 1:回転と移動 2:IK 3:不明 4:IK影響下 5:回転影響下 6:IK接続先 7:非表示 8:捻り 9:回転運動
423 | */
424 |
425 | public Bone(BinaryReader bin)
426 | {
427 | this.bone_name = base.ConvertByteToString(bin.ReadBytes(20));
428 | this.parent_bone_index = bin.ReadUInt16();
429 | this.tail_pos_bone_index = bin.ReadUInt16();
430 | this.bone_type = bin.ReadByte();
431 | this.ik_parent_bone_index = bin.ReadUInt16();
432 | this.bone_head_pos = base.ReadSinglesToVector3(bin);
433 | }
434 | }
435 |
436 | public class IKList : MMD.Format
437 | {
438 | public ushort ik_data_count; // IKデータ数
439 | public IK[] ik_data; // IKデータ((11+2*ik_chain_length)/IK)
440 |
441 | public IKList(BinaryReader bin)
442 | {
443 | this.ik_data_count = bin.ReadUInt16();
444 | //Debug.Log("IKDataCount:"+ik_data_count);
445 | this.ik_data = new IK[this.ik_data_count];
446 | for (int i = 0; i < this.ik_data_count; i++)
447 | this.ik_data[i] = new IK(bin);
448 | }
449 | }
450 |
451 | public class IK : MMD.Format
452 | {
453 | public ushort ik_bone_index; // IKボーン番号
454 | public ushort ik_target_bone_index; // IKターゲットボーン番号 // IKボーンが最初に接続するボーン
455 | public byte ik_chain_length; // IKチェーンの長さ(子の数)
456 | public ushort iterations; // 再帰演算回数 // IK値1
457 | public float control_weight; // IKの影響度 // IK値2
458 | public ushort[] ik_child_bone_index; // IK影響下のボーン番号
459 |
460 | public IK(BinaryReader bin)
461 | {
462 | this.ik_bone_index = bin.ReadUInt16();
463 | this.ik_target_bone_index = bin.ReadUInt16();
464 | this.ik_chain_length = bin.ReadByte();
465 | this.iterations = bin.ReadUInt16();
466 | this.control_weight = bin.ReadSingle();
467 | this.ik_child_bone_index = base.ReadUInt16s(bin, this.ik_chain_length);
468 | }
469 | }
470 |
471 | public class SkinList : MMD.Format
472 | {
473 | public ushort skin_count; // 表情数
474 | public SkinData[] skin_data; // 表情データ((25+16*skin_vert_count)/skin)
475 |
476 | public SkinList(BinaryReader bin)
477 | {
478 | this.skin_count = bin.ReadUInt16();
479 | //Debug.Log("SkinCount:"+skin_count);
480 | this.skin_data = new SkinData[this.skin_count];
481 | for (int i = 0; i < this.skin_count; i++)
482 | this.skin_data[i] = new SkinData(bin);
483 | }
484 | }
485 |
486 | public class SkinData : MMD.Format
487 | {
488 | public string skin_name; // 表情名
489 | public uint skin_vert_count; // 表情用の頂点数
490 | public byte skin_type; // 表情の種類 // 0:base、1:まゆ、2:目、3:リップ、4:その他
491 | public SkinVertexData[] skin_vert_data; // 表情用の頂点のデータ(16bytes/vert)
492 |
493 | public SkinData(BinaryReader bin)
494 | {
495 | this.skin_name = base.ConvertByteToString( bin.ReadBytes(20));
496 | this.skin_vert_count = bin.ReadUInt32();
497 | this.skin_type = bin.ReadByte();
498 | this.skin_vert_data = new SkinVertexData[this.skin_vert_count];
499 | for (int i = 0; i < this.skin_vert_count; i++)
500 | this.skin_vert_data[i] = new SkinVertexData(bin);
501 | }
502 | }
503 |
504 | public class SkinVertexData : MMD.Format
505 | {
506 | // 実際の頂点を参照するには
507 | // int num = vertex_count - skin_vert_count;
508 | // skin_vert[num]みたいな形で参照しないと無理
509 | public uint skin_vert_index; // 表情用の頂点の番号(頂点リストにある番号)
510 | public Vector3 skin_vert_pos; // x, y, z // 表情用の頂点の座標(頂点自体の座標)
511 |
512 | public SkinVertexData(BinaryReader bin)
513 | {
514 | this.skin_vert_index = bin.ReadUInt32();
515 | this.skin_vert_pos = base.ReadSinglesToVector3(bin);
516 | }
517 | }
518 |
519 | // 表情用枠名
520 | public class SkinNameList : MMD.Format
521 | {
522 | public byte skin_disp_count;
523 | public ushort[] skin_index; // 表情番号
524 |
525 | public SkinNameList(BinaryReader bin)
526 | {
527 | this.skin_disp_count = bin.ReadByte();
528 | this.skin_index = base.ReadUInt16s(bin, this.skin_disp_count);
529 | }
530 | }
531 |
532 | // ボーン用枠名
533 | public class BoneNameList : MMD.Format
534 | {
535 | public byte bone_disp_name_count;
536 | public string[] disp_name; // 50byte
537 |
538 | public BoneNameList(BinaryReader bin)
539 | {
540 | this.bone_disp_name_count = bin.ReadByte();
541 | this.disp_name = new string[this.bone_disp_name_count];
542 | for (int i = 0; i < this.bone_disp_name_count; i++)
543 | this.disp_name[i] = base.ConvertByteToString(bin.ReadBytes(50));
544 | }
545 | }
546 |
547 | // ボーン枠用表示リスト
548 | public class BoneDisplayList : MMD.Format
549 | {
550 | public uint bone_disp_count;
551 | public BoneDisplay[] bone_disp;
552 |
553 | public BoneDisplayList(BinaryReader bin)
554 | {
555 | this.bone_disp_count = bin.ReadUInt32();
556 | this.bone_disp = new MMD.PMD.PMDFormat.BoneDisplay[this.bone_disp_count];
557 | for (int i = 0; i < this.bone_disp_count; i++)
558 | bone_disp[i] = new BoneDisplay(bin);
559 | }
560 | }
561 |
562 | public class BoneDisplay : MMD.Format
563 | {
564 | public ushort bone_index; // 枠用ボーン番号
565 | public byte bone_disp_frame_index; // 表示枠番号
566 |
567 | public BoneDisplay(BinaryReader bin)
568 | {
569 | this.bone_index = bin.ReadUInt16();
570 | this.bone_disp_frame_index = bin.ReadByte();
571 | }
572 | }
573 |
574 | ///
575 | /// 英語表記用ヘッダ
576 | ///
577 | public class EnglishHeader : MMD.Format
578 | {
579 | public byte english_name_compatibility; // 01で英名対応
580 | public string model_name_eg; // 20byte
581 | public string comment_eg; // 256byte
582 |
583 | public EnglishHeader(BinaryReader bin)
584 | {
585 | this.english_name_compatibility = bin.ReadByte();
586 |
587 | if (this.english_name_compatibility != 0)
588 | { // 英語名対応あり
589 | this.model_name_eg = base.ConvertByteToString(bin.ReadBytes(20));
590 | this.comment_eg = base.ConvertByteToString(bin.ReadBytes(256));
591 | }
592 | }
593 | }
594 |
595 | ///
596 | /// 英語表記用ボーンの英語名
597 | ///
598 | public class EnglishBoneNameList : MMD.Format
599 | {
600 | public string[] bone_name_eg; // 20byte * bone_count
601 |
602 | public EnglishBoneNameList(BinaryReader bin, int boneCount)
603 | {
604 | this.bone_name_eg = new string[boneCount];
605 | for (int i = 0; i < boneCount; i++)
606 | {
607 | bone_name_eg[i] = base.ConvertByteToString(bin.ReadBytes(20));
608 | }
609 | }
610 | }
611 |
612 | public class EnglishSkinNameList : MMD.Format
613 | {
614 | // baseは英名が登録されない
615 | public string[] skin_name_eg; // 20byte * skin_count-1
616 |
617 | public EnglishSkinNameList(BinaryReader bin, int skinCount)
618 | {
619 | skin_name_eg = new string[skinCount];
620 | for (int i = 0; i < skinCount - 1; i++)
621 | {
622 | skin_name_eg[i] = base.ConvertByteToString(bin.ReadBytes(20));
623 | }
624 | }
625 | }
626 |
627 | public class EnglishBoneDisplayList : MMD.Format
628 | {
629 | public string[] disp_name_eg; // 50byte * bone_disp_name_count
630 |
631 | public EnglishBoneDisplayList(BinaryReader bin, int boneDispNameCount)
632 | {
633 | disp_name_eg = new string[boneDispNameCount];
634 | for (int i = 0; i < boneDispNameCount; i++)
635 | {
636 | disp_name_eg[i] = base.ConvertByteToString(bin.ReadBytes(50));
637 | }
638 | }
639 | }
640 |
641 | public class ToonTextureList : MMD.Format
642 | {
643 | public string[] toon_texture_file; // 100byte * 10個固定
644 |
645 | public ToonTextureList(BinaryReader bin)
646 | {
647 | this.toon_texture_file = new string[10];
648 | for (int i = 0; i < this.toon_texture_file.Length; i++)
649 | {
650 | this.toon_texture_file[i] = base.ConvertByteToString(bin.ReadBytes(100));
651 | }
652 | }
653 | }
654 |
655 | public class RigidbodyList : MMD.Format
656 | {
657 | public uint rigidbody_count;
658 | public PMD.PMDFormat.Rigidbody[] rigidbody;
659 |
660 | public RigidbodyList(BinaryReader bin)
661 | {
662 | this.rigidbody_count = bin.ReadUInt32();
663 | this.rigidbody = new MMD.PMD.PMDFormat.Rigidbody[this.rigidbody_count];
664 | for (int i = 0; i < this.rigidbody_count; i++)
665 | this.rigidbody[i] = new MMD.PMD.PMDFormat.Rigidbody(bin);
666 | }
667 | }
668 |
669 | ///
670 | /// 剛体
671 | ///
672 | public class Rigidbody : MMD.Format
673 | {
674 | public string rigidbody_name; // 諸データ:名称 ,20byte
675 | public int rigidbody_rel_bone_index;// 諸データ:関連ボーン番号
676 | public byte rigidbody_group_index; // 諸データ:グループ
677 | public ushort rigidbody_group_target; // 諸データ:グループ:対象 // 0xFFFFとの差
678 | public byte shape_type; // 形状:タイプ(0:球、1:箱、2:カプセル)
679 | public float shape_w; // 形状:半径(幅)
680 | public float shape_h; // 形状:高さ
681 | public float shape_d; // 形状:奥行
682 | public Vector3 pos_pos; // 位置:位置(x, y, z)
683 | public Vector3 pos_rot; // 位置:回転(rad(x), rad(y), rad(z))
684 | public float rigidbody_weight; // 諸データ:質量 // 00 00 80 3F // 1.0
685 | public float rigidbody_pos_dim; // 諸データ:移動減 // 00 00 00 00
686 | public float rigidbody_rot_dim; // 諸データ:回転減 // 00 00 00 00
687 | public float rigidbody_recoil; // 諸データ:反発力 // 00 00 00 00
688 | public float rigidbody_friction; // 諸データ:摩擦力 // 00 00 00 00
689 | public byte rigidbody_type; // 諸データ:タイプ(0:Bone追従、1:物理演算、2:物理演算(Bone位置合せ)) // 00 // Bone追従
690 |
691 | public Rigidbody(BinaryReader bin)
692 | {
693 | this.rigidbody_name = base.ConvertByteToString(bin.ReadBytes(20));
694 | this.rigidbody_rel_bone_index = bin.ReadUInt16();
695 | this.rigidbody_group_index = bin.ReadByte();
696 | this.rigidbody_group_target = bin.ReadUInt16();
697 | this.shape_type = bin.ReadByte();
698 | this.shape_w = bin.ReadSingle();
699 | this.shape_h = bin.ReadSingle();
700 | this.shape_d = bin.ReadSingle();
701 | this.pos_pos = base.ReadSinglesToVector3(bin);
702 | this.pos_rot = base.ReadSinglesToVector3(bin);
703 | this.rigidbody_weight = bin.ReadSingle();
704 | this.rigidbody_pos_dim = bin.ReadSingle();
705 | this.rigidbody_rot_dim = bin.ReadSingle();
706 | this.rigidbody_recoil = bin.ReadSingle();
707 | this.rigidbody_friction = bin.ReadSingle();
708 | this.rigidbody_type = bin.ReadByte();
709 | }
710 | }
711 |
712 | public class RigidbodyJointList : MMD.Format
713 | {
714 | public uint joint_count;
715 | public Joint[] joint;
716 |
717 | public RigidbodyJointList(BinaryReader bin)
718 | {
719 | this.joint_count = bin.ReadUInt32();
720 | this.joint = new MMD.PMD.PMDFormat.Joint[this.joint_count];
721 | for (int i = 0; i < this.joint_count; i++)
722 | this.joint[i] = new MMD.PMD.PMDFormat.Joint(bin);
723 | }
724 | }
725 |
726 | public class Joint : MMD.Format
727 | {
728 | public string joint_name; // 20byte
729 | public uint joint_rigidbody_a; // 諸データ:剛体A
730 | public uint joint_rigidbody_b; // 諸データ:剛体B
731 | public Vector3 joint_pos; // 諸データ:位置(x, y, z) // 諸データ:位置合せでも設定可
732 | public Vector3 joint_rot; // 諸データ:回転(rad(x), rad(y), rad(z))
733 | public Vector3 constrain_pos_1; // 制限:移動1(x, y, z)
734 | public Vector3 constrain_pos_2; // 制限:移動2(x, y, z)
735 | public Vector3 constrain_rot_1; // 制限:回転1(rad(x), rad(y), rad(z))
736 | public Vector3 constrain_rot_2; // 制限:回転2(rad(x), rad(y), rad(z))
737 | public Vector3 spring_pos; // ばね:移動(x, y, z)
738 | public Vector3 spring_rot; // ばね:回転(rad(x), rad(y), rad(z))
739 |
740 | public Joint(BinaryReader bin)
741 | {
742 | this.joint_name = base.ConvertByteToString(bin.ReadBytes(20));
743 | this.joint_rigidbody_a = bin.ReadUInt32();
744 | this.joint_rigidbody_b = bin.ReadUInt32();
745 | this.joint_pos = base.ReadSinglesToVector3(bin);
746 | this.joint_rot = base.ReadSinglesToVector3(bin);
747 | this.constrain_pos_1 = base.ReadSinglesToVector3(bin);
748 | this.constrain_pos_2 = base.ReadSinglesToVector3(bin);
749 | this.constrain_rot_1 = base.ReadSinglesToVector3(bin);
750 | this.constrain_rot_2 = base.ReadSinglesToVector3(bin);
751 | this.spring_pos = base.ReadSinglesToVector3(bin);
752 | this.spring_rot = base.ReadSinglesToVector3(bin);
753 | }
754 | }
755 | }
756 | }
757 | namespace VMD
758 | {
759 | public class VMDLoader
760 | {
761 | static public VMD.VMDFormat Load(BinaryReader bin, string path, string clip_name)
762 | {
763 | return new VMD.VMDFormat(bin, path, clip_name);
764 | }
765 | }
766 |
767 | public class VMDFormat
768 | {
769 | public string name;
770 | public string path;
771 | public string folder;
772 | public string clip_name;
773 | public GameObject pmd;
774 |
775 | public Header header;
776 | public MotionList motion_list;
777 | public SkinList skin_list;
778 | public LightList light_list;
779 | public CameraList camera_list;
780 | public SelfShadowList self_shadow_list;
781 |
782 | int read_count = 0;
783 |
784 | void EntryPathes(string path)
785 | {
786 | this.path = path;
787 | string[] buf = path.Split('/');
788 | this.name = buf[buf.Length-1];
789 | this.name = name.Split('.')[0]; // .vmdを抜かす
790 |
791 | // VMDが格納されているフォルダ
792 | this.folder = buf[0];
793 | for (int i = 1; i < buf.Length-1; i++)
794 | this.folder += "/" + buf[i];
795 | }
796 |
797 | public VMDFormat(BinaryReader bin, string path, string clip_name)
798 | {
799 | // 読み込み失敗した場合はだいたいデータがない
800 | // 失敗しても読み込み続けることがあるので例外でキャッチして残りはnullにしておく
801 | try {
802 | this.clip_name = clip_name;
803 | this.header = new MMD.VMD.VMDFormat.Header(bin); read_count++;
804 | this.motion_list = new MMD.VMD.VMDFormat.MotionList(bin); read_count++;
805 | this.skin_list = new MMD.VMD.VMDFormat.SkinList(bin); read_count++;
806 | this.camera_list = new MMD.VMD.VMDFormat.CameraList(bin); read_count++;
807 | this.light_list = new MMD.VMD.VMDFormat.LightList(bin); read_count++;
808 | this.self_shadow_list = new MMD.VMD.VMDFormat.SelfShadowList(bin); read_count++;
809 | } catch (EndOfStreamException e) {
810 | Debug.Log(e.Message);
811 | if (read_count <= 0)
812 | this.header = null;
813 | if (read_count <= 1 || this.motion_list.motion_count <= 0)
814 | this.motion_list = null;
815 | if (read_count <= 2 || this.skin_list.skin_count <= 0)
816 | this.skin_list = null;
817 | if (read_count <= 3 || this.camera_list.camera_count <= 0)
818 | this.camera_list = null;
819 | if (read_count <= 4 || this.light_list.light_count <= 0)
820 | this.light_list = null;
821 | if (read_count <= 5 || this.self_shadow_list.self_shadow_count <= 0)
822 | this.self_shadow_list = null;
823 | }
824 | }
825 |
826 |
827 | public class Header : MMD.Format
828 | {
829 | public string vmd_header; // 30byte, "Vocaloid Motion Data 0002"
830 | public string vmd_model_name; // 20byte
831 |
832 | public Header(BinaryReader bin)
833 | {
834 | this.vmd_header = base.ConvertByteToString(bin.ReadBytes(30));
835 | this.vmd_model_name = base.ConvertByteToString(bin.ReadBytes(20));
836 | }
837 | }
838 |
839 | public class MotionList : MMD.Format
840 | {
841 | public uint motion_count;
842 | public Dictionary> motion;
843 |
844 | public MotionList(BinaryReader bin)
845 | {
846 | this.motion_count = bin.ReadUInt32();
847 | this.motion = new Dictionary>();
848 |
849 | // 一度バッファに貯めてソートする
850 | Motion[] buf = new Motion[this.motion_count];
851 | for (int i = 0; i < this.motion_count; i++)
852 | buf[i] = new Motion(bin);
853 | Array.Sort(buf);
854 |
855 | // モーションの数だけnewされないよね?
856 | for (int i = 0; i < this.motion_count; i++) {
857 | try { this.motion.Add(buf[i].bone_name, new List()); }
858 | catch {}
859 | }
860 |
861 | // dictionaryにどんどん登録
862 | for (int i = 0; i < this.motion_count; i++)
863 | this.motion[buf[i].bone_name].Add(buf[i]);
864 | }
865 | }
866 |
867 | public class Motion : MMD.Format
868 | {
869 | public string bone_name; // 15byte
870 | public uint flame_no;
871 | public Vector3 location;
872 | public Quaternion rotation;
873 | public byte[] interpolation; // [4][4][4], 64byte
874 |
875 | public Motion(BinaryReader bin)
876 | {
877 | this.bone_name = base.ConvertByteToString(bin.ReadBytes(15));
878 | this.flame_no = bin.ReadUInt32();
879 | this.location = base.ReadSinglesToVector3(bin);
880 | this.rotation = base.ReadSinglesToQuaternion(bin);
881 | this.interpolation = bin.ReadBytes(64);
882 | this.count = (int)this.flame_no;
883 | }
884 |
885 | // なんか不便になりそうな気がして
886 | public byte GetInterpolation(int i, int j, int k)
887 | {
888 | return this.interpolation[i*16+j*4+k];
889 | }
890 |
891 | public void SetInterpolation(byte val, int i, int j, int k)
892 | {
893 | this.interpolation[i*16+j*4+k] = val;
894 | }
895 | }
896 |
897 | ///
898 | /// 表情リスト
899 | ///
900 | public class SkinList : MMD.Format
901 | {
902 | public uint skin_count;
903 | public Dictionary> skin;
904 |
905 | public SkinList(BinaryReader bin)
906 | {
907 | this.skin_count = bin.ReadUInt32();
908 | this.skin = new Dictionary>();
909 |
910 | // 一度バッファに貯めてソートする
911 | SkinData[] buf = new SkinData[this.skin_count];
912 | for (int i = 0; i < this.skin_count; i++)
913 | buf[i] = new SkinData(bin);
914 | Array.Sort(buf);
915 |
916 | // 全てのモーションを探索し、利用されているボーンを特定する
917 | for (int i = 0; i < this.skin_count; i++) {
918 | try { skin.Add(buf[i].skin_name, new List()); }
919 | catch { /*重複している場合はこの処理に入る*/ }
920 | }
921 |
922 | // 辞書に登録する作業
923 | for (int i = 0; i < this.skin_count; i++)
924 | this.skin[buf[i].skin_name].Add(buf[i]);
925 | }
926 | }
927 |
928 | public class SkinData : MMD.Format
929 | {
930 | public string skin_name; // 15byte
931 | public uint flame_no;
932 | public float weight;
933 |
934 | public SkinData(BinaryReader bin)
935 | {
936 | this.skin_name = base.ConvertByteToString(bin.ReadBytes(15));
937 | this.flame_no = bin.ReadUInt32();
938 | this.weight = bin.ReadSingle();
939 | this.count = (int)this.flame_no;
940 | }
941 | }
942 |
943 | public class CameraList : MMD.Format
944 | {
945 | public uint camera_count;
946 | public CameraData[] camera;
947 |
948 | public CameraList(BinaryReader bin)
949 | {
950 | this.camera_count = bin.ReadUInt32();
951 | this.camera = new CameraData[this.camera_count];
952 | for (int i = 0; i < this.camera_count; i++)
953 | this.camera[i] = new CameraData(bin);
954 |
955 | Array.Sort(camera);
956 | }
957 | }
958 |
959 | public class CameraData : MMD.Format
960 | {
961 | public uint flame_no;
962 | public float length;
963 | public Vector3 location;
964 | public Vector3 rotation; // オイラー角, X軸は符号が反転している
965 | public byte[] interpolation; // [6][4], 24byte(未検証)
966 | public uint viewing_angle;
967 | public byte perspective; // 0:on 1:off
968 |
969 | public CameraData(BinaryReader bin)
970 | {
971 | this.flame_no = bin.ReadUInt32();
972 | this.length = bin.ReadSingle();
973 | this.location = base.ReadSinglesToVector3(bin);
974 | this.rotation = base.ReadSinglesToVector3(bin);
975 | this.interpolation = bin.ReadBytes(24);
976 | this.viewing_angle = bin.ReadUInt32();
977 | this.perspective = bin.ReadByte();
978 | this.count = (int)this.flame_no;
979 | }
980 |
981 | public byte GetInterpolation(int i, int j)
982 | {
983 | return this.interpolation[i*6+j];
984 | }
985 |
986 | public void SetInterpolation(byte val, int i, int j)
987 | {
988 | this.interpolation[i*6+j] = val;
989 | }
990 | }
991 |
992 | public class LightList : MMD.Format
993 | {
994 | public uint light_count;
995 | public LightData[] light;
996 |
997 | public LightList(BinaryReader bin)
998 | {
999 | this.light_count = bin.ReadUInt32();
1000 | this.light = new LightData[this.light_count];
1001 | for (int i = 0; i < this.light_count; i++)
1002 | this.light[i] = new LightData(bin);
1003 |
1004 | Array.Sort(this.light);
1005 | }
1006 | }
1007 |
1008 | public class LightData : MMD.Format
1009 | {
1010 | public uint flame_no;
1011 | public Color rgb; // αなし, 256
1012 | public Vector3 location;
1013 |
1014 | public LightData(BinaryReader bin)
1015 | {
1016 | this.flame_no = bin.ReadUInt32();
1017 | this.rgb = base.ReadSinglesToColor(bin, 1);
1018 | this.location = base.ReadSinglesToVector3(bin);
1019 | this.count = (int)this.flame_no;
1020 | }
1021 | }
1022 |
1023 | public class SelfShadowList : MMD.Format
1024 | {
1025 | public uint self_shadow_count;
1026 | public SelfShadowData[] self_shadow;
1027 |
1028 | public SelfShadowList(BinaryReader bin)
1029 | {
1030 | this.self_shadow_count = bin.ReadUInt32();
1031 | this.self_shadow = new SelfShadowData[this.self_shadow_count];
1032 | for (int i = 0; i < this.self_shadow_count; i++)
1033 | this.self_shadow[i] = new SelfShadowData(bin);
1034 |
1035 | Array.Sort(this.self_shadow);
1036 | }
1037 | }
1038 |
1039 | public class SelfShadowData : MMD.Format
1040 | {
1041 | public uint flame_no;
1042 | public byte mode; //00-02
1043 | public float distance; // 0.1 - (dist * 0.00001)
1044 |
1045 | public SelfShadowData(BinaryReader bin)
1046 | {
1047 | this.flame_no = bin.ReadUInt32();
1048 | this.mode = bin.ReadByte();
1049 | this.distance = bin.ReadSingle();
1050 | this.count = (int)this.flame_no;
1051 | }
1052 | }
1053 | }
1054 | }
1055 | }
--------------------------------------------------------------------------------