Skip to content

Commit

Permalink
Merge pull request #5 from Live2D/develop
Browse files Browse the repository at this point in the history
Update to Cubism 5 SDK for Unreal Engine R1 alpha4
  • Loading branch information
itoh-at-live2d-com authored Dec 5, 2024
2 parents 9d40484 + 17bdb94 commit 87fe04d
Show file tree
Hide file tree
Showing 50 changed files with 1,440 additions and 48 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [5-r.1-alpha.4] - 2024-12-05

### Added

* Add motion curve validations to `motion3.json` importer. by [@pillowtrucker](https://github.com/Live2D/CubismNativeFramework/pull/57)
* Add feature to reimport Cubism assets.
* Due to incompatibility with this update, support for Unreal Engine 5.1 will be discontinued.

### Fixed

* Fix texture misidentification as normal maps.


## [5-r.1-alpha.3] - 2024-10-31

### Changed
Expand Down Expand Up @@ -36,5 +49,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* New released!


[5-r.1-alpha.4]: https://github.com/Live2D/CubismUnrealEngineComponents/compare/5-r.1-alpha.3...5-r.1-alpha.4
[5-r.1-alpha.3]: https://github.com/Live2D/CubismUnrealEngineComponents/compare/5-r.1-alpha.2...5-r.1-alpha.3
[5-r.1-alpha.2]: https://github.com/Live2D/CubismUnrealEngineComponents/compare/5-r.1-alpha.1...5-r.1-alpha.2
2 changes: 1 addition & 1 deletion Live2DCubismSDK.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "5-r.1-alpha.3",
"VersionName": "5-r.1-alpha.4",
"FriendlyName": "Live2DCubismSDK",
"Description": "Live2D Cubism SDK for Unreal Engine Components",
"Category": "Other",
Expand Down
12 changes: 1 addition & 11 deletions NOTICE.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# お知らせ

## [制限事項] alpha版における機能制限について (2024-09-05)
## [制限事項] alpha版における機能制限について (2024-12-05 更新)

### レベル

Expand All @@ -13,11 +13,6 @@ alpha版ではOpenWorldレベルでの利用に対応しておりません。

### モデルの表示

#### モデルテクスチャ

現在モデルのテクスチャが1024x1024 1枚の場合に正常に描画されない問題を確認しています。
これを回避するにはCubism Editorにてテクスチャアトラスを1024x1024 1枚以外(2048x2048 1枚、1024x1024 2枚 等)に設定し再度書き出し直したモデルをインポートしてください。

#### ピューポート表示

レベルにLive2Dモデルをスポーンした直後正しく表示されない場合があります。
Expand All @@ -27,11 +22,6 @@ alpha版ではOpenWorldレベルでの利用に対応しておりません。

alpha版ではモバイル端末上でのパフォーマンス向上のためのダブルバッファリングは実装されていません。

### 再インポート機能

alpha版では組み込み用ファイルの再インポート機能が実装されていません。
再インポートを行う場合は、インポート済みのアセットを削除してから再度インポートを行ってください。

### コンポーネント

各コンポーネントのプロパティ値を変更しPlayした際、Playする前に変更した値が反映されない問題を確認しています。
Expand Down
14 changes: 2 additions & 12 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Notices

## [Restrictions] Feature Restrictions in the Alpha Version (2024-09-05)
## [Restrictions] Feature Restrictions in the Alpha Version (2024-12-05 update)


### Level
Expand All @@ -13,12 +13,7 @@ The alpha version does not support the use of OpenWorld levels. Please use the B

### Display the model

#### Model Textures

We have identified an issue where models with a single 1024x1024 texture do not render correctly.
To avoid this issue, please adjust the texture atlas in Cubism Editor to anything other than a single 1024x1024 (e.g., a single 2048x2048, or two 1024x1024 textures), then re-export and re-import the model.

### Viewport Display
#### Viewport Display

Live2D models may not display correctly immediately after being spawned in a level.
In such cases, please enable the real-time update feature in the viewport to refresh the screen.
Expand All @@ -27,11 +22,6 @@ In such cases, please enable the real-time update feature in the viewport to ref

Double buffering for performance improvement on mobile devices is not implemented in the alpha version.

### Assets Reimport

The assets reimport feature for embedded files is not implemented in the alpha version.
If you need to reimport, please delete the imported assets and then reimport them.

### Components

We have identified an issue where property values changed in each component are not reflected when you play after making changes.
Expand Down
1 change: 0 additions & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Cubismファイルをuassetファイルに変換する機能は `./Source/Live2D
| Unreal Editor 5.4 | 5.4.4 |
| Unreal Editor 5.3 | 5.3.2 |
| Unreal Editor 5.2 | 5.2.1 |
| Unreal Editor 5.1 | 5.1.1 |

| ライブラリ / ツール | バージョン |
| --- | --- |
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Resources like shaders and other assets are located in `./Content/Materials`.
| Unreal Editor 5.4 | 5.4.4 |
| Unreal Editor 5.3 | 5.3.2 |
| Unreal Editor 5.2 | 5.2.1 |
| Unreal Editor 5.1 | 5.1.1 |

| Library / Tool | Version |
| --- | --- |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/


#include "DisplayInfo/CubismDisplayInfo3Json.h"

void UCubismDisplayInfo3Json::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismDisplayInfo3Json::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismDisplayInfo3Json::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
42 changes: 42 additions & 0 deletions Source/Live2DCubismFramework/Private/Expression/CubismExp3Json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/


#include "Expression/CubismExp3Json.h"

void UCubismExp3Json::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismExp3Json::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismExp3Json::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
33 changes: 33 additions & 0 deletions Source/Live2DCubismFramework/Private/Model/CubismMoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,36 @@ void UCubismMoc3::PostLoad()

Setup();
}

void UCubismMoc3::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismMoc3::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismMoc3::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
42 changes: 42 additions & 0 deletions Source/Live2DCubismFramework/Private/Model/CubismModel3Json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/


#include "Model/CubismModel3Json.h"

void UCubismModel3Json::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismModel3Json::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismModel3Json::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
42 changes: 42 additions & 0 deletions Source/Live2DCubismFramework/Private/Motion/CubismMotion3Json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/


#include "Motion/CubismMotion3Json.h"

void UCubismMotion3Json::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismMotion3Json::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismMotion3Json::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/


#include "Physics/CubismPhysics3Json.h"

void UCubismPhysics3Json::PostInitProperties()
{
#if WITH_EDITORONLY_DATA
if (!HasAnyFlags(RF_ClassDefaultObject))
{
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
#endif
Super::PostInitProperties();
}

#if WITH_EDITORONLY_DATA
void UCubismPhysics3Json::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
if (AssetImportData)
{
OutTags.Add( FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden) );
}

Super::GetAssetRegistryTags(OutTags);
}
void UCubismPhysics3Json::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);

if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData)
{
// AssetImportData should always be valid
AssetImportData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}
}
#endif
Loading

0 comments on commit 87fe04d

Please sign in to comment.