diff --git a/.gitignore b/.gitignore index 2703f31..31c3a85 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ /scpt/*.jpeg /scpt/*.png config +book/_book +book/node_modules +book/desktop.ini diff --git a/book/README.md b/book/README.md new file mode 100644 index 0000000..d11d5d4 --- /dev/null +++ b/book/README.md @@ -0,0 +1,5 @@ +![](cover.jpg) + +# Unreal Engine 5 Guide Book + +download | web diff --git a/book/SUMMARY.md b/book/SUMMARY.md new file mode 100644 index 0000000..7f14d2e --- /dev/null +++ b/book/SUMMARY.md @@ -0,0 +1,10 @@ +# Summary + +* [Unreal Engine 5 Guild Book](README.md) +* [default](default/README.md) + * [version](default/00_version.md) + * [start](default/01_start.md) + * [install](default/02_install.md) +* [gas](gas/README.md) + * [custom](gas/00_custom.md) +* [end](end/README.md) diff --git a/book/cover.jpg b/book/cover.jpg new file mode 100644 index 0000000..da45d3a Binary files /dev/null and b/book/cover.jpg differ diff --git a/book/default/00_version.md b/book/default/00_version.md new file mode 100644 index 0000000..1eebb8f --- /dev/null +++ b/book/default/00_version.md @@ -0,0 +1,39 @@ + +現在使用しているpluginやassetの`version`を記述します。 + +ゲーム制作は無料のassetだけで作れます。しかし、時間やクオリティを向上させたい場合は有料のassetを使いましょう。 + +本書の一部では有料assetの使い方を解説します。 + +## asset + +|name|latest|body| +|---|---|---| +|[game animation sample](https://dev.epicgames.com/documentation/en-us/unreal-engine/game-animation-sample-project-in-unreal-engine)|5.5|キャラクターをパルクールアクション| +|[city sample](https://www.unrealengine.com/marketplace/ja/product/city-sample)|5.5|大規模な都市を構築| +|[control rig sample](https://www.fab.com/ja/listings/2ce3fe44-9ee6-4fa7-99fc-b9424a402386)|5.5|人間以外のキャラクター| + +## plugin + +|name|latest|body| +|---|---|---| +|[pixel streaming](https://github.com/EpicGamesExt/PixelStreamingInfrastructure/blob/master/Docs/pixel-streaming-2-migration-guide.md)|2|ゲームをserverにdeployしてwebからプレイ| +|[twinmotion](https://www.twinmotion.com/ja)|20250101p|建造物をインポート| +|[vrm4u](https://github.com/ruyo/VRM4U/releases/tag/20250103)|20250103|vrmモデルを動かす| +|[kawaiiphysics](https://github.com/pafuhana1213/KawaiiPhysics)|20241201|揺れものを設定| +|[varest](https://github.com/ufna/VaRest)|20240828|curlのようなもの。保守が終了しているのでbuildが必要| + +## 有料 + +|name|latest| +|---|---| +|[ultra dynamic sky](https://docs.google.com/document/d/1xAr0Hd3mY7Mp0g0waKLUvJaddUPaVxEeRoEEFXctCE0/)|20250203|天候| +|[superhero flight animations](https://www.fab.com/ja/listings/41185c19-5191-4153-8293-8cc9901efa95)|20241217|空を飛ぶ| + +## link + +こちらで最新情報を取り扱っています。 + +- https://git.syui.ai/ai/ue/ +- https://blueprintue.com/profile/ai/ +- https://dev.epicgames.com/community/profile/organization/gdkg/ai/ diff --git a/book/default/01_start.md b/book/default/01_start.md new file mode 100644 index 0000000..c3a6d57 --- /dev/null +++ b/book/default/01_start.md @@ -0,0 +1,55 @@ +## ueとは + +`Unreal Engine`は`epic games`という会社が作っているゲームエンジンです。よく`ue`と略されます。 + +最新バージョン(latest version)は`5`なので、`ue5`となります。 + +`ue`の他には`unity`, `godto`が有名です。`DirectX`というものがあり、例えば、`DX12`からGPUに命令を送ることができます。ゲームエンジンの多くは`DX11`, `DX12`を使用します。 + +|name|url| +|---|---| +|unreal engine|https://unrealengine.com/| +|github|https://github.com/EpicGames/UnrealEngine| + +ソース(source)からビルド(build)して使うこともできます。一部でbuildしないと使えない機能があります。private repoなので[こちら](https://www.unrealengine.com/ja/ue-on-github)からアクセス権をもらいます。 + +## ueの特徴と注意 + +`c++`か`blueprint`で書きます。 + +ueの特徴はグラフィックが綺麗なことです。と言ってもきれいなグラフィックはunityなどでも実現可能です。しかし、ueは初期設定でもそれが実現できるので、主にグラフィック用途で使用されています。 + +ueはバグ(bug)が多く基本的に動きません。これはアップデート(update)が速く、3Dを扱うソフトウェア(software)なので仕方ありません。複雑なのです。 + +ueを長く使っているとわかることですが、ゲーム制作にはあまり向きません。unityのほうがおすすめです。ueはきれいな画像やシーンを作る用途におすすめです。 + +「ueはバグが多く基本的に壊れている」このことを最初に理解しておかないと「おかしい、動かない」と時間を無駄にしてしまいます。また、保存せず長時間コードを書き続けるのは危険です。クラッシュ(crash)すると消えてしまいます。プロジェクト(project)そのものが壊れることもよくあります。注意しましょう。 + +## 用語の解説 + +|title|short|body| +|---|---|---| +|unrealengine|ue|アンリアルエンジン| +|version|ver|バージョン| +|code||コード、プログラミング言語で書かれた文章| +|build||ビルド、osで実行できる形式にすること。windowsなら`.exe`| +|compile||コンパイル、コンピュータで実行できる形式にすること。buildと同じ意味で使われる| +|source|src|ソース、主にソースコードの略| +|server||サーバー、リクエストに応じるコンピュータ| +|deploy||serverに実行ファイルを置くこと| +|example|ex|例、uriではexample.comが有名| +|install||インストール、アプリをインストールすること| +|application|app|アプリ、ソフトウェア(software)のこと| +|library|lib|ライブラリ、softwareを構築するための部品| +|package|pkg|パッケージ、appだったり、libだったり色々。基本的にpkg managerでinstallできるものを指す| +|update|up|アップデート、5.5の`x.5`の部分を言う ex: 5.4 -> 5.5| +|upgrade||アップグレード、5.5の`5.x`の部分を言う ex: 4.0 -> 5.0| +|asset||アセット、ueでは購入できるlibやexampleを指す| +|plugin|plug|プラグイン、エンジンに直接入れる追加機能。新たなblueprintなどを使えるようになる| +|crash||クラッシュ、アプリやosが落ちること| +|cache||キャッシュ、一時ファイルのこと。tmpなども使われる| +|repository|repo|リポジトリ、主にsrc codeの一式が置いてある場所| +|project||プロジェクト、ueでは主に新しいゲームを作った時のフォルダ一式| +|blueprint|bp|ブループリント、ueのノードベースで書く形式。anim blueprintはabp、character blueprintはcbpと略される事が多く、ファイル名は`BP_XXX`, `ABP_XXX`, `CBP_XXX`となる。基本大文字が使われる| + +基本的に英語で書けるものは英語で書きます。ueのmenuは英語にするのがおすすめです。様々な単語に慣れておきましょう。 diff --git a/book/default/02_install.md b/book/default/02_install.md new file mode 100644 index 0000000..6cea707 --- /dev/null +++ b/book/default/02_install.md @@ -0,0 +1,53 @@ +## install + +srcからbuildしない場合は`epicgames launcher`からinstallします。 + +https://www.unrealengine.com/download + +また、[vsinstaller](https://visualstudio.microsoft.com/ja/downloads/)を使用して必要なpackageを入れてください。 + +![](../img/0001.png) + +[vscode](https://github.com/microsoft/vscode)でbuildするには`.uproject`を右クリックして`.sln`を作ります。 + +## package build + +まずは新しいprojectを作り、package buildできるかを試してみましょう。 + +ueではbuildが通らないことがよくあります。長い時間をかけて作り上げたもののbuildが通らない自体は避けましょう。 + +なお、`mac`, `linux`は、ほとんどうまくいきません。package化に成功してもappが正常に起動しないことがあります。使用するpluginやassetなども影響します。 + +```sh +# corss compile tool : https://dev.epicgames.com/documentation/ja-jp/unreal-engine/linux-development-requirements-for-unreal-engine +# ubuntu(xorg + nvidia) + +$ sudo apt-get install xorg xvfb +Xvfb :99 & +export DISPLAY=:99 + +$ sudo apt-get install vulkan-tools +$ sudo apt-get install mesa-vulkan-drivers +``` + +## engineとproject + +installする場所は自分で決められます。参考の場所を紹介します。 + +```sh +# engine +C:\Program Files\Epic\UE_5.5\Engine\Binaries\Win64\UnrealEditor.exe + +# project +C:\Users\$USER\Documents\Unreal Projects\MyProject\MyProject.uproject +``` + +## windows tool + +|name|url| +|---|---| +|pwsh|https://github.com/PowerShell/PowerShell| +|windows terminal|https://github.com/microsoft/terminal| +|openssh|https://github.com/PowerShell/Win32-OpenSSH| +|vscode|https://github.com/microsoft/vscode| + diff --git a/book/default/README.md b/book/default/README.md new file mode 100644 index 0000000..c705a63 --- /dev/null +++ b/book/default/README.md @@ -0,0 +1,9 @@ +## 本書の目的 + +ue5でゲームを作成するまでの過程をまとめます。 + +主に`example`形式で記述し、実行するとその通りの結果になることを目指します。 + +|name|latest|body| +|---|---|---| +|[unreal engine](https://dev.epicgames.com/documentation/ja-jp/unreal-engine/unreal-engine-5.5-release-notes)|5.5.2|ゲームエンジン| diff --git a/book/end.jpg b/book/end.jpg new file mode 100644 index 0000000..4df58e2 Binary files /dev/null and b/book/end.jpg differ diff --git a/book/end/README.md b/book/end/README.md new file mode 100644 index 0000000..f842088 --- /dev/null +++ b/book/end/README.md @@ -0,0 +1,5 @@ +![](../end.jpg) + +# Unreal Engine 5 Guide Book + +download | web diff --git a/book/gas/00_custom.md b/book/gas/00_custom.md new file mode 100644 index 0000000..f2e1f39 --- /dev/null +++ b/book/gas/00_custom.md @@ -0,0 +1,23 @@ +## 新しいキャラを追加する + +これには`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`に書き換えます。 +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`にします。 + diff --git a/book/gas/README.md b/book/gas/README.md new file mode 100644 index 0000000..7816203 --- /dev/null +++ b/book/gas/README.md @@ -0,0 +1,58 @@ +## GASとは + +[game aimation sample](https://www.fab.com/ja/listings/880e319a-a59e-4ed2-b268-b32dac7fa016)はepicgamesが提供しているassetです。 + +まずはこれを使ってキャラクター(chacater)を動かしてみましょう。 + +## level(map) + +1. `/Content/Levels/DefaultLevel`を開きます。 +2. 再生ボタンを押します。 +3. ゲームがプレイできます。 + +|key|en|ja| +|---|---|---| +|w,a,s,d|move|移動| +|space|jump|ジャンプ| +|space|sprint|ダッシュ| +|ctrl|walk|歩く| +|c|crouch|しゃがむ| +|マウススクロール|camera|カメラ| + +ボタンに乗るとキャラを切り替えることができます。 + +レベル(level)はマップ(map)とも呼ばれます。プレイ(play)する場所を作ります。 + +特にボタンが重要です。tipsを確認しましょう。 + +- https://www.youtube.com/watch?v=IqHrhcA7Rsk + +`/Content/Levels/DefaultLevel`を右クリックして`参照ビューア`を選択してみます。どのファイルを参照しているかわかります。 + +## BP + +characterは`/Content/Blueprints/CBP_SandboxCharacter`で動かしています。このファイルを開いて編集してみましょう。 + +1. `EventGraph`というノードが記述されている場所(画面中央)で右クリックし、`Debug Key 1`を追加します。 +2. Releasedというピンから`Print String`を追加します。 +3. ゲームを再生します。 +4. キーボード(keyboard)の`[1]`を押すと、画面に`Hello`が表示されます。 + +これがbp(blueprint)でゲームを作る要領になります。 + +## input + +まずkeyがどこで設定されているのかと言うと、`/Content/Input/IMC_Sandbox`で設定されています。 + +例えば、`/Content/Input/IA_Aim`をコピー(copy)して、新しく`IA_One`を作ってみましょう。それを`IMC_Sandbox`で読み込んで`[1]`に割り当てます。 + +次に、`IA_One`を先程の`CBP_Sandbox_Character`にドラッグ&ドロップ(D&D)します。 + +すると`EnhancedInputAction IA_One`という赤いノードが作成されたと思います。`Debug Key 1`を削除して代わりにつなぎます。色にも意味がありますが、そのうちわかってくると思います。 + +ゲームを再生してみると先ほどと同じkeyで動きます。 + +## ABP + +characterの動きは`/Content/Blueprints/ABP_Sandbox_Character`で設定されています。 + diff --git a/book/gitbook.md b/book/gitbook.md new file mode 100644 index 0000000..2a3bc55 --- /dev/null +++ b/book/gitbook.md @@ -0,0 +1,10 @@ +## start gitbook(honkit) + +```sh +$ nvm use 23 +$ npm install honkit --save-dev +$ npx honkit init +$ npx honkit serve +$ npx honkit build +``` + diff --git a/book/img/0001.png b/book/img/0001.png new file mode 100644 index 0000000..8d05700 Binary files /dev/null and b/book/img/0001.png differ diff --git a/book/package.json b/book/package.json new file mode 100644 index 0000000..228e0c7 --- /dev/null +++ b/book/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "got": "^14.4.5" + }, + "devDependencies": { + "honkit": "^6.0.2" + } +}