-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
288 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 23 | ||
|
||
- name: Build | ||
env: | ||
TZ: "Asia/Tokyo" | ||
run: | | ||
cd ./book | ||
npm i | ||
npx honkit build | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./book/_book | ||
publish_branch: gh-pages | ||
user_name: 'ai[bot]' | ||
user_email: '138105980+yui-syui-ai[bot]@users.noreply.github.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ue-book.syui.ai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 海の境界を消す | ||
|
||
海には境界があってそれが惑星システム(planet system)を構築する際に邪魔になるので消します。 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# city sample | ||
|
||
[city sample](https://www.unrealengine.com/marketplace/ja/product/city-sample) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# CRでキャラクターを動かす | ||
|
||
`control rig`は`CR_xxx`というファイル名がつけられています。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# control rig sample | ||
|
||
[control rig sample](https://www.fab.com/ja/listings/2ce3fe44-9ee6-4fa7-99fc-b9424a402386) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
この章は読み飛ばしてください。まとめやすいように重要項目を上にしています。 | ||
|
||
最初はわからないかもしれませんが、最後まで読んでまた来ると、わかるようになっているかもしれません。 | ||
|
||
## variable(var) | ||
|
||
まずは変数の紹介です。変数はローカル変数(local)、グローバル変数(global)があります。最初はprojectで読み込むところに作ります。 | ||
|
||
1. フォルダの`/Content/Blueprints/`で右クリックして、ブループリントクラス、`GameInstance`を作ります。例えば、`GM_xxx`にします。(名前はなんでもいいです) | ||
2. `設定 -> プロジェクト設定 -> マップ&モード`の`Game Instance:GameInstance Class`に`GM_xxx`を読み込みます。 | ||
|
||
なお、名前に`Default`, `Test`, `Config`などを使う場合は予約されていることがあります。注意してください。 | ||
|
||
これを開いて、変数のところで`UserTest`という名前で`string`型の変数を作ります。コンパイル(compile)してください。デフォルト値は`World`とでも入れておきましょう。 | ||
|
||
次に、`/Content/Blueprints/CBP_SandboxCharacter`を開いて、EventGraphで右クリックし、`Cast To GM_xxx`を選択します。 | ||
|
||
インプット(input)のpin(ピン)にあるObjectには`Get Game Instance`をつなぎます。そして、アウトプット(output)の青線は`Get UserTest`と検索し、それを`Print String`につなぎます。 | ||
|
||
さて、ここにkeyを設定して再生すると`World`と表示されるはずです。 | ||
|
||
特に重要なのが`変数の型`です。種類もそうですが、変数の型の右側にある色アイコンをクリックしてみると、たくさんの形式があることがわかります。 | ||
|
||
- 単一 | ||
- 配列 | ||
- 設定 | ||
- マップ | ||
|
||
配列を使ってみましょう。`UserTestList`という名前で`string`の配列を作成します。 | ||
|
||
ここで、デフォルト値に追加できることに気づくはずです。 | ||
|
||
例えば、単語を3つ追加してみます。 | ||
|
||
- [0]ai | ||
- [1]burst | ||
- [2]can | ||
|
||
`Cast To GM_xxx`から`Get UserTestList`を引っ張り出し、`Length`につなげます。それをprintしてみると、`2`と表示されるはずです。 | ||
|
||
`length(len)`はその配列に追加された数を知ることができます。 | ||
|
||
では、全部の値を取り出すため`for`を書きましょう。`UserTestList`から`For Each Loop`を伸ばして`Loop Body`からprintにつなぎます。値は`Array Element`から取ります。 | ||
|
||
もし文字列をつなぎたいなら`Append`が使えます。 | ||
|
||
変数にはObjectをいれることもできます。たくさんのObjectを入れておき、`Find`で検索して取り出すこともできます。 | ||
|
||
では、characterを全部まとめて検索できる変数を作ってみます。 | ||
|
||
名前は`UserCharacterObj`でstringを選択し、マップを選択します。右側のマップは`オブジェクト(object)`と検索し、object参照を選択します。 | ||
|
||
```sh | ||
str obj | ||
--- --- | ||
``` | ||
|
||
`cbp character`と検索し、characterのcbpを入れていきます。名前はわかりやすいものにしてください。例えば、`manny`, `quinn`など。 | ||
|
||
では繋いでいきます。 | ||
|
||
```sh | ||
[Get Game Instance] --> [Cast To GM_Defaultconfig] --> [UserCharacterObj] | ||
|
||
--> [Find(manny)] --> [Get Object Name] --> [Print String] | ||
``` | ||
|
||
<iframe src="https://blueprintue.com/render/_q-q_ffz/" scrolling="no" allowfullscreen style="width:100%;height:400px"></iframe> | ||
|
||
基本的にこれを利用して、他のBPと値をやり取りすることになります。例えば、`ABP_SandboxCharacter`で条件を満たしたとき実行してほしいアニメーション(anim)があったとします。 | ||
|
||
この場合、まず`GM_xxx`の変数で`UserCharacterAnim`をboolean型で作り、実行してほしいタイミングで`CBP_SandboxCharacter`に書いた`Cast To GM_Defaultconfig`から`UserCharacterAnim`を`true`に変更します。`Set UserCharacterAnim`で検索してください。そして、ABPには`UserCharacterAnim`がtrueならanimを再生する処理を書きます。 | ||
|
||
## function(func) | ||
|
||
次は関数です。関数は簡単で、何度も繰り返す部分を再利用可能な形で残します。それが関数です。 | ||
|
||
新しい関数を作ってみましょう。左バーの関数(+)を押せば作成されます。名前は`FuncTest`にします。 | ||
|
||
関数を表す紫色のボックス(box)を選択した状態でinputとoutputの見てもらって、inputにboolという名前でboolean型を作ります。outputにはstrという名前でstring型を作ります。 | ||
|
||
処理の内容はboolがtrueなら`[yes]`というstringを出力し、falseなら`[no]`にします。 | ||
|
||
<iframe src="https://blueprintue.com/render/pvn4lao9/2" scrolling="no" allowfullscreen style="width:100%;height:400px"></iframe> | ||
|
||
確認してみましょう。`[9]`を押すと`[yes][no]`が表示されます。 | ||
|
||
<iframe src="https://blueprintue.com/render/pvn4lao9/1" scrolling="no" allowfullscreen style="width:100%;height:400px"></iframe> | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
 | ||
 | ||
|
||
# Unreal Engine 5 Guide Book | ||
|
||
<a href="/book.pdf" target=”_blank”>download</a> | <a href="https://book-ue.syui.ai" target="_blank">web</a> | ||
<a href="/book.pdf" target=”_blank”>download</a> | <a href="https://ue-book.syui.ai" target="_blank">web</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
## 新しいキャラを追加する | ||
# キャラクターを追加する | ||
|
||
これには`IKリターゲット`が必要です。 | ||
|
||
1. `Content/Blueprints/CBP_SandboxCharacter_Manny`をcopyして`CBP_SandboxCharacter_test`を作ります。 | ||
2. `CBP_SandboxCharacter_test`を開いて、`Mesh`の下にあるSKM(スケルタルメッシュ)の`Manny`を選択します。その状態で`詳細(details) -> タグ(tags)`からインデックス(index)の0を`RTG_UEFN_to_UE5_test`に書き換えます。 | ||
2. `CBP_SandboxCharacter_test`を開いて、`Mesh`の下にあるSKM(スケルタルメッシュ)の`Manny`を選択します。その状態で`詳細(details) -> タグ(tags) -> Component Tags`から`index[0]`を`RTG_UEFN_to_UE5_test`に書き換えます。 | ||
3. `Content/Blueprints/RetargetedCharacters/ABP_GenericRetarget`を開き、変数の`IKRetargeter_Map`に新しく`RTG_UEFN_to_UE5_test`を追加し、ファイルは`/Content/Characters/UE5_Mannequins/Rigs/RTG_UEFN_to_UE5_Mannequin`を参照します。 | ||
4. `/Content/Widgets/GameAnimationWidget`を開いて、characterのiconのところをcopyして貼り付けます。そして、詳細からObjectで `Content/Blueprints/CBP_SandboxCharacter_test`を参照します。 | ||
|
||
これで新しいキャラを使用することが可能になります。 | ||
|
||
## 飛びつける高さを増やす | ||
|
||
1. `Content/Blueprints/CBP_SandboxCharacter`を開いて、関数の`TryTraversalAction`を編集します。 | ||
2. 一番下の`Max:275`を`Max:475`に変更します。 | ||
3. `/Content/Characters/UEFN_Mannequin/Animations/Traversal/CHT_TraversalAnims`を開きます。 | ||
4. `Mantles(編集)`から先程変更した値のところを全部`275 -> 475`に書き換えます。 | ||
|
||
例えば、levelにあるblockの高さを変更して飛びつけるか確認します。 | ||
|
||
1. `LevelBlock_TraversableXX`を選択します。 | ||
2. トランスフォーム(transform)の拡大(scale)のところで青色(transform-scale-z)を`4.5`にします。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 飛びつける高さを増やす | ||
|
||
1. `Content/Blueprints/CBP_SandboxCharacter`を開いて、関数の`TryTraversalAction`を編集します。 | ||
2. 一番下の`Max:275`を`Max:475`に変更します。 | ||
3. `/Content/Characters/UEFN_Mannequin/Animations/Traversal/CHT_TraversalAnims`を開きます。 | ||
4. `Mantles(編集)`から先程変更した値のところを全部`275 -> 475`に書き換えます。 | ||
|
||
例えば、levelにあるblockの高さを変更して飛びつけるか確認します。 | ||
|
||
1. `LevelBlock_TraversableXX`を選択します。 | ||
2. トランスフォーム(transform)の拡大(scale)のところで青色(transform-scale-z)を`4.5`にします。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# キャラクターの見た目を変える | ||
|
||
キャラクターの見た目を変えるには`.vrm`を使うと便利です。これは`pixiv`が作っている規格です。 | ||
|
||
ueで読み込むには`vrm4u`というpluginを使用します。 | ||
|
||
## vrm4u | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# モーションキャプチャで動かす | ||
|
||
カメラ(camera)からcharacterを動かす技術をモーションキャプチャ(motion capture)といいます。様々なprotocol(プロトコル)がありますが、`vrm4u`では[vmc](https://qiita.com/mintan/items/72d63cce4e6197b151b7)というprotocolを使います。 | ||
|
||
`epicgames`は[livelink](https://dev.epicgames.com/documentation/ja-jp/unreal-engine/live-link-in-unreal-engine)というものを作っています。 | ||
|
||
必要なものは多く、基本的には`web-camera`、`client-app`, `ue-plugin`が必要です。私は以下を使っています。 | ||
|
||
- camera: ノートパソコンに付属しているwebカメラ | ||
- client: [webcam motion capture](https://webcammotioncapture.info/) | ||
- plugin: [vrm4u](https://github.com/ruyo/VRM4U) | ||
|
||
clientはそれぞれのosにあったものを選びます。無料でも可能ですが、性能的には有料アプリがおすすめです。いくつか紹介しておきます。 | ||
|
||
この辺の情報は最初はわからないと思いますが、基本的には以下の流れで情報を処理します。 | ||
|
||
```sh | ||
[camera] --> [client] --> [plugin] | ||
``` | ||
|
||
## client | ||
|
||
|name|body|free| | ||
|---|---|---| | ||
|[vmc](https://github.com/sh-akira/VirtualMotionCapture)|vmcの開発元が出しているclient。protocolと同じ名前がつけられている|🟩| | ||
|[vseeface](https://www.vseeface.icu/)|高性能なclient|🟩| | ||
|[xr animator](https://booth.pm/ja/items/4513654)|お手軽に表示できるclient|🟩| | ||
|[waidayo](https://booth.pm/ja/items/1779185)|iosにも対応しているclient|🟩| | ||
|[vrm posing desktop](https://store.steampowered.com/app/1895630/VRM_Posing_Desktop/)|steamから出ているclient|🟥| | ||
|[webcam motion capture](https://webcammotioncapture.info/)|安定したclient。使ってみた中では動きが一番良かった|🟥| | ||
|
||
## build packageを使うときportに注意 | ||
|
||
clientから送信されるportをpluginで受信します。build packageの`.exe`で確認するときは、editor(エディタ)を落としておきましょう。 | ||
|
||
## 停止したときだけvmcを有効にする | ||
|
||
<iframe width="100%" height="415" src="https://www.youtube.com/embed/BsLOlAr-wBY?si=jahPUVD8YMMfefvm&start=195&mute=1&rel=0&showinfo=0&controls=0&end=204" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | ||
|
||
VMCモードを有効にすると、キャラクターがidle状態、つまり、停止しているときだけVMCのモーションキャプチャを反映させます。 | ||
これはVMCモードの変数を用意し、ABPで条件を書いて実現しています。キャラクターを動かしたときは一時的に無効にします。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# 揺れものを設定する | ||
|
||
[kawaiiphysics](https://github.com/pafuhana1213/kawaiiphysics) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# カメラワークを設定する | ||
|
||
スキル発動時にカメラをぐるっと回す演出です。 | ||
スキル発動時にボス戦であれば演出されます。 | ||
正面カメラを設置し、タイムラインで動かしたあとに通常(後方)カメラに切り替えることで実現しています。 | ||
|
||
<iframe width="100%" height="415" src="https://www.youtube.com/embed/BsLOlAr-wBY?si=jahPUVD8YMMfefvm&start=29&end=34&mute=1&rel=0&showinfo=0&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | ||
|
||
|
Oops, something went wrong.