UniVRM/docs/release/056/v0.56.0.md
2021-10-18 18:32:15 +09:00

187 lines
12 KiB
Markdown

# v0.56.0: 最低バージョンを Unity-2018.4 に更新
* [Release](https://github.com/vrm-c/UniVRM/releases/tag/v0.56.0)
* [Milestone](https://github.com/vrm-c/UniVRM/milestone/15?closed=1)
[Full Changelog](https://github.com/vrm-c/UniVRM/compare/v0.55.0...v0.56.0)
## 主な変更
### Unity対応バージョンを更新
* サポートバージョンを `Unity-2018.4LTS 以降` `.Net4` のみに更新しました。
- [**closed**] Update Unity version [\#420](https://github.com/vrm-c/UniVRM/pull/420)
* UnVRMのUnityバージョンは`5.6.7f1`から`2018.4.23f1`に更新した
### VRMShaders フォルダを独立
* MToon
* UniUnlit
* ShaderProperty
`VRMShaders` フォルダに移動して、独立した UPM パッケージとしました。
UniVRM-0.55 以前からアップグレードする場合は、 `Assets/VRM` を一度削除してからインストールしなおすことをおすすめします(unitypackageはファイルの移動に対応していないため)。
- [**closed**] **Separate vrmshaders** [\#436](https://github.com/vrm-c/UniVRM/pull/436)
* `VRM`からパッケージを分割して、`VRMShaders`が独立。シェーダは`VRMShaders`に移動した
- [**closed**] **update MToon** [\#435](https://github.com/vrm-c/UniVRM/pull/435)
* MToonバージョンはv3.3に更新した
- [**closed**] add constant UniGLTF.UniUnlit.Utils.ShaderName [\#442](https://github.com/vrm-c/UniVRM/pull/442)
### UniVRM の UPM 対応
`Unity-2019.3` で導入された [git url](https://docs.unity3d.com/Manual/upm-ui-giturl.html) によるパッケージ指定に対応しました。
以下の2つを登録することで UniVRM を使用できます。
VRM が VRMShaders に依存しています。
- https://github.com/vrm-c/UniVRM/releases
- [**closed**] **Add Basic UPM integration** [\#393](https://github.com/vrm-c/UniVRM/pull/393) ([eelstork](https://github.com/eelstork))
* UniVRMはパッケージとして使えるようになった
### BlendShapeKeyのインタフェースを厳格化、整理
BlendShapeKeyを作成する方法が不明瞭だったため、
より明示的な API に置き換えました。
* BlendShapeClip.Key 追加
| before | after | 備考 |
|------------------------------------------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| public BlendShapeKey(string name, BlendShapePreset preset) | private | BlendShapePreset.Unknownのときの挙動が不明瞭だった。代わりに、CreateFromPreset または CreateUnknown を使用してください |
| BlendShapeKey.CreateFrom | BlendShapeKey.CreateFromClip | 他の関数に合わせて、名前を変更 |
| new BlendShpaeKey(BlendShapePreset) | BlendShapeKey.CreateFromPreset | オーバーロードをやめて明示的な関数に変更 |
| new BlendShpaeKey(string) | BlendShapeKey.CreateUnknown | オーバーロードをやめて明示的な関数に変更。#330 以前は、Enum.Parse(ignoreCase=true) のような動作をしていました。この関数で作成した場合は、 BlendShapePreset.Unknown になります。 |
* https://github.com/vrm-c/UniVRM/pull/330
参考コード
```csharp
// #330以前の動作
public BlendShapeKey(string name) : this(name, BlendShapePreset.Unknown)
{
}
public BlendShapeKey(string name, BlendShapePreset preset)
{
Name = name.ToUpper();
Preset = preset;
if (Preset != BlendShapePreset.Unknown)
{
m_id = Preset.ToString().ToUpper();
}
else
{
m_id = Name;
}
}
public bool Equals(BlendShapeKey other)
{
return ID == other.ID;
}
// v0.56 でだいたい同じような動きをするコード
static BlendShapeKey CreateKeyOld(string src)
{
// Enum があまり速くない(GC出たり)ようなので、パフォーマンス要件が厳しい場合はキャッシュするなど工夫することをおすすめします
if (Enum.TryParse<BlendShapePreset>(src, true, out BlendShapePreset preset))
{
if (preset != BlendShapePreset.Unknown)
{
return BlendShapeKey.CreateFromPreset(preset);
}
}
return BlendShapeKey.CreateUnknown(src);
}
```
- [**closed**] **Update BlendShapeKey interface** [\#427](https://github.com/vrm-c/UniVRM/pull/427)
### MeshUtility の追加
* `https://github.com/vrm-c/UniVRM.git?path=/Assets/MeshUtilty`
で導入できます。
https://github.com/vrm-c/UniVRM/tree/master/Assets/MeshUtility
SkinnedMeshRenderer + Mesh を
* SkinnedMeshRenderer + Mesh(BlendShapeのある三角形を含むコピー)
* SkinnedMeshRenderer + Mesh(BlednShapeの無い三角形を含むコピー)
に分解します。
- [**closed**] **Add mesh utility** [\#434](https://github.com/vrm-c/UniVRM/pull/434)
* メッシュを分割するUtilityを追加した
### Exporter の更新
- [**closed**] **Add blendshape options to export dialog** [\#421](https://github.com/vrm-c/UniVRM/pull/421)
* BlendShapeオプションをエクスポートダイアログに追加した
- [**closed**] **ExporterWindowに警告メッセージを実装** [\#404](https://github.com/vrm-c/UniVRM/pull/404)
- [**closed**] add error messages for export validation [\#447](https://github.com/vrm-c/UniVRM/pull/447)
* エクスポート時、ルートに移動・回転・スケールがある場合にメッセージを出す
- [**closed**] EditorExport時にアセットが見つかったTextureは、それを使う [\#433](https://github.com/vrm-c/UniVRM/pull/433)
* Jpgフォマットのテクスチャは出力できるようになった
- [**closed**] Fix nullcheck [\#432](https://github.com/vrm-c/UniVRM/pull/432)
* BlendShapeProxyの無いモデルのエクスポート時(Vrmになる前の初回エクスポート)にエラーなっていた問題を修正した
- [**closed**] Add an option to remove vertex color in export menu [\#428](https://github.com/vrm-c/UniVRM/pull/428)
* 頂点カラー情報を削除するオプションを追加した
- [**closed**] Save the export directory [\#419](https://github.com/vrm-c/UniVRM/pull/419)
* VRMエクスポート二回目からダイアログのデフォルトは前回の出力先を指定するようになった
- [**closed**] Fix export nonactive mesh [\#401](https://github.com/vrm-c/UniVRM/pull/401)
* BlendShapeBindingによって参照される非アクティブなメッシュはエクスポートしない。対象オブジェクトはアクティブなメッシュがない場合、エクスポートしない
- [**closed**] Check bone names duplicate when export vrm file. [\#378](https://github.com/vrm-c/UniVRM/pull/378) ([neon-izm](https://github.com/neon-izm))
* 名前同じのボーンはエクスポート禁止
### unitypackage
- [**closed**] update export UnityPackage menu [\#441](https://github.com/vrm-c/UniVRM/pull/441)
* VRMShadersを追加してUniJSON-standalone、UniHumanoid-standaloneとUniGLTF-standaloneを削除した
- [**closed**] asmdef をpackageに同梱するように変更 [\#405](https://github.com/vrm-c/UniVRM/pull/405)
## その他のChangelog
- [**closed**] **Add texture transform extensions** [\#229](https://github.com/vrm-c/UniVRM/pull/229)
* textureInfoの拡張であるKHR_texture_transformの対応
- [**closed**] BuildMesh load balancing in ImporterContext [\#451](https://github.com/vrm-c/UniVRM/pull/451)
* 動的読み込み時のフレームレート低下を防ぐためBuildMeshの処理をフレーム分散させるオプションを用意しました
- [**closed**] Fix vrm look at blend shape applyer [\#449](https://github.com/vrm-c/UniVRM/pull/449)
* BlendShapeで制御される目が動かないの問題を修正した
- [**closed**] check invalid file name [\#445](https://github.com/vrm-c/UniVRM/pull/445)
* テクスチャ名前が長すぎるとVRMファイルがエクスポート禁止。インポート時に制御文字のエスケープを追加した
- [**closed**] Fix: SpringBone LateUpdate to FixedUpdate [\#430](https://github.com/vrm-c/UniVRM/pull/430) ([yoship1639](https://github.com/yoship1639))
* `fixed update`を追加して、`fixed update`か`late update`かを選べるようになった
- [**closed**] fix MaterialImporter and TextureTransformTest [\#417](https://github.com/vrm-c/UniVRM/pull/417)
* ImporterContextをMaterialImporterに持ち運ばなくても動くように変更した。それに伴ってテストも修正した
- [**closed**] Add cache enum [\#416](https://github.com/vrm-c/UniVRM/pull/416)
* Enum.Parse and Enum.GetValuesをキャッシュする
- [**closed**] Suppress garbage collection due to using linq [\#413](https://github.com/vrm-c/UniVRM/pull/413)
* LINQ構文使用によってVRMロード時に発生していたGCを抑制を対応した
- [**closed**] VrmFirstPersonを修正 [\#412](https://github.com/vrm-c/UniVRM/pull/412)
- [**closed**] fix multi frame blendShape [\#410](https://github.com/vrm-c/UniVRM/pull/410)
- [**closed**] Fix argument textureitem [\#409](https://github.com/vrm-c/UniVRM/pull/409)
- [**closed**] Changed to be able to extend texture loader. [\#408](https://github.com/vrm-c/UniVRM/pull/408)
* テクスチャローダーを拡張できるように変更した
- [**closed**] fix glTFPbrMetallicRoughness init. [\#403](https://github.com/vrm-c/UniVRM/pull/403)
* materials[]->pbrMetallicRoughnessの項目が無い場合にImportに失敗するの問題を修正した
- [**closed**] Fix blendshape uppercase bug. [\#399](https://github.com/vrm-c/UniVRM/pull/399) ([sh-akira](https://github.com/sh-akira))
* BlendShap大文字のためにエラーが発生するバグを修正した
- [**closed**] Fix: Large heap allocation in BoneMeshEraser.ExcludeTriangles [\#389](https://github.com/vrm-c/UniVRM/pull/389)
* 頂点数が多いモデルを読み込んだ時に、BoneMeshEraser.ExcludeTriangles内で大量のヒープアロケートが発生していたの問題を対応した
- [**closed**] onloadmodel to return ienumerator [\#386](https://github.com/vrm-c/UniVRM/pull/386)
* ImporterContext.OnLoadModelの戻り値をIEnumeratorに変更した
- [**closed**] Bvhのfloat.parseのロケール問題を修正 [\#383](https://github.com/vrm-c/UniVRM/pull/383)
* ロケールを無視して英語で処理してしまうため、小数点が、ピリオドでないロケール(フランス語など)に対する修正
- [**closed**] Add non-string based method to search prefab [\#381](https://github.com/vrm-c/UniVRM/pull/381) ([sator-imaging](https://github.com/sator-imaging))
- [**closed**] Support mesh sharing morph target [\#380](https://github.com/vrm-c/UniVRM/pull/380) ([mkc1370](https://github.com/mkc1370))
* Blenderから*.gltfや*.glbを書き出した際にモーフ名付きのメッシュが読み込まれない問題の修正を行いました
- [**closed**] Adding support for editor preview on non-windows platforms [\#379](https://github.com/vrm-c/UniVRM/pull/379) ([sator-imaging](https://github.com/sator-imaging))
* Windowsじゃないのプラットフォームのサポートの追加した。エディターのプレビューのみ
- [**closed**] Fix: memory leak in editor preview [\#325](https://github.com/vrm-c/UniVRM/pull/325) ([ropo](https://github.com/ropo))