Skip to content

Commit

Permalink
update book
Browse files Browse the repository at this point in the history
  • Loading branch information
syui committed Feb 16, 2025
1 parent 751efc9 commit 5578955
Show file tree
Hide file tree
Showing 29 changed files with 1,029 additions and 57 deletions.
2 changes: 1 addition & 1 deletion book/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![](cover.jpg)

# Unreal Engine 5 Guide Book
# Unreal Engine Guide Book

<a href="/book.pdf" target=”_blank”>download</a> | <a href="https://ue-book.syui.ai" target="_blank">web</a>
28 changes: 17 additions & 11 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# Summary

* [Unreal Engine 5 Guild Book](README.md)
* [Unreal Engine Guild Book](README.md)
* [default](default/README.md)
* [asset/plugin](default/00_asset.md)
* [start](default/01_start.md)
* [install](default/02_install.md)
* [tips](default/03_tips.md)
* [game animation sample](gas/README.md)
* [キャラクターを追加する](gas/01_character.md)
* [飛びつける高さを増やす](gas/02_jump.md)
* [キャラクターの見た目を変える](gas/03_vrm.md)
* [モーションキャプチャで動かす](gas/04_vmc.md)
* [揺れものを設定する](gas/05_kawaii.md)
* [カメラワークの設定する](gas/06_camera.md)
* [アニメーションを作成する](gas/07_anim.md)
* [niagaraでダメージを出す](gas/08_niagara.md)
* [椅子に座る](gas/09_chair.md)
* [issue](default/00_issue.md)
* [game animation sample](gasp/README.md)
* [キャラクターを追加する](gasp/01_character.md)
* [飛びつける高さを増やす](gasp/02_jump.md)
* [キャラクターの見た目を変える](gasp/03_vrm.md)
* [モーションキャプチャで動かす](gasp/04_vmc.md)
* [揺れものを設定する](gasp/05_kawaii.md)
* [カメラワークの設定する](gasp/06_camera.md)
* [アニメーションを作成する](gasp/07_anim.md)
* [niagaraでダメージを出す](gasp/08_niagara.md)
* [椅子に座る](gasp/09_chair.md)
* [issue](gasp/00_issue.md)
* [control rig sample](crs/README.md)
* [CRでキャラクターを動かす](crs/01_character.md)
* [ボスを作る](crs/02_boss.md)
* [city sample](city/README.md)
* [惑星形式のmapを作る](city/01_remove.md)
* [橋を作る](city/02_bridge.md)
* [建造物を作る](city/03_house.md)
* [issue](city/00_issue.md)
* [json blueprint utilities](json/README.md)
* [apiから情報を取得する](json/01_varest.md)
* [pixel streaming](pixel/README.md)
Expand All @@ -32,4 +35,7 @@
* [ultra dynamic sky](plan/02_uds.md)
* [ocean waves](plan/03_ocean.md)
* [nice interaction system](plan/04_item.md)
* [unity](unity/README.md)
* [blender](blender/README.md)
* [モデルをカスタマイズする](blender/01_model.md)
* [end](end/README.md)
19 changes: 19 additions & 0 deletions book/blender/01_model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# モデルをカスタマイズする

素体を作ります。色々と探したのですが、なかなか納得するものが見つかりません。できる限り現実に近いものを目指します。

今回は、Aモデル(vrm)とBモデル(部位)の統合をblenderで行います。統合したものをvrmにexportして、ueでimportします。Bモデルにはシェイプキーを設定しているので、ueではモーフターゲットとして動かせるようにします。

blenderのexportやueのimportは注意が必要です。`VRM MToon`, `ペアレントで[Body]頂点`, `UVMap`, `シェイプキーをSKkeeperで上書き`が必要でした。

使用する[addon](/blender/)を確認してください。

1. まずBモデルをblenderで読み込み、いらないものを削除します。vrmを読み込むaddonが必要です。
2. materialに`VRM MToon`を設定します。ueでimportする際にcrashします。
3. dataのUVマップに`UVMap_xxx`となっているときは名前を`UVMap`にします。色がおかしくなります。
4. 編集モードでBモデルを膨らませます。これは頂点を選択して[G]を押します。
5. addonの`SKkeeper`を使い、オブジェクトメニューからapply modifyを選択します。追加モデルのmirrorやkeyをまとめます。これをしないとvrmにexportできません。
6. 次にAモデルの編集です。いくつかの面を削除してBモデルをくっつけても違和感ないようにします。
7. トランスフォームのペアレントで[Body]頂点を選択します。G, [y, z, r]などを駆使して位置調整してください。

ペアレントは正しく設定されるときもあればズレることもあります。モーフターゲットが正しく反映されないこともあります。`[Armatrue]ボーン(hip)`につけることで設定しています。しかし、ueで読み込んだとき少し下に表示されるので、これ自体をずらした場所で調整するしかありませんでした。
9 changes: 9 additions & 0 deletions book/blender/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# blender

[blender](https://blender.org/)でモデルを編集して、ueで読み込みます。

|addon|body|
|---|---|
|https://github.com/saturday06/VRM-Addon-for-Blender|vrmを読み込む|
|https://github.com/smokejohn/SKkeeper|modifireをobjectに反映|

76 changes: 76 additions & 0 deletions book/city/00_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# issue

[issue](/default/00_issue.html)

## buildが遅い場合

もしcity sampleのmapを使わない場合は、buildが遅くなってしまいます。

ueのpackage化が遅い場合、使用するmap以外をbuildしないようにすることで、処理時間を短縮できます。以下の手順で設定を行います。

1. `プロジェクト設定`を開きます。
2. 「パッケージ化」セクションに移動します。
3. 「マップのみをクック」オプションにチェックを入れます。
4. 「パッケージ化されたビルドに含めるマップのリスト」に、必要なマップ(.umapファイル)を指定します。

この設定により、指定したmapのみがpackage化され、データサイズが小さくなり、処理時間も短縮されます。

## ue5.5ではbuildが通らない

`2024-11-18`時点ではcity sampleはue5.5でbuildが通りません。ue5.4では通ります。

`Engine/Plugins/Performance/AutomatedPerfTestingにAutomatedPerfTestConfig.cs`, `AutomatedPerfTestNode.cs`が含まれていないため`${project}/Build/Script/CitySample.Automation.csproj`に記述されているcompileが通らないのです。`AutomatedPerfTesting`は5.5で追加されたpluginです。

```html
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="CitySample.Automation.csproj.props" Condition="Exists('CitySample.Automation.csproj.props')"/>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(EngineDir)\Plugins\Performance\AutomatedPerfTesting\Build\Scripts\AutomatedPerfTestConfig.cs" />
<Compile Include="$(EngineDir)\Plugins\Performance\AutomatedPerfTesting\Build\Scripts\AutomatedPerfTestNode.cs" />
</ItemGroup>

</Project>
```

> Experimental release of Automated Perf Testing Plugin v0.1, providing Gauntlet Test Controllers, UAT Test Nodes, and BuildGraph macros for adding common automated performance tests to a project’s automated build and test.
- https://dev.epicgames.com/documentation/ja-jp/unreal-engine/unreal-engine-5.5-release-notes
- https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Plugins/AutomatedPerfTesting

これはgithubにあるsrcから持ってくるしかありません。アクセスするにはorgに参加します。

https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Plugins/Performance/AutomatedPerfTesting/Build/Scripts

1. `$(EngineDir)\Plugins\Performance\AutomatedPerfTesting\Build\Scripts`フォルダを作ります。`$(EngineDir)`はueがインストールされているディレクトリです。
2. githubの[src](https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Plugins/Performance/AutomatedPerfTesting/Build/Scripts)から持ってきた`$(EngineDir)\Plugins\Performance\AutomatedPerfTesting\Build\Scripts\AutomatedPerfTestConfig.cs`, `$(EngineDir)\Plugins\Performance\AutomatedPerfTesting\Build\Scripts\AutomatedPerfTestNode.cs`を同ディレクトリに置きます。

## 問題が起こったときにresetする

`/Content/Map/Small_City_LVL.umap``/Content/__ExternalActors__/Map/Small_City_LVL`を上書きします。copy元は`VaultCache`からでもいいですし、新しく作った`CitySample`のprojectからでもいいです。

基本的に新しいprojectを作成するときは`VaultCache`からcopyされます。これがないとdownloadから`VaultCache`が生成されます。



## characterのcollisionが機能せず地面に埋まってしまう

GASPと統合するとcity sampleに置かれた物体に触れられません。

原因は`Gameplay Camera`というpluginです。`$project/Config/DefaultEngine.ini``DDCVar.NewGameplayCameraSystem.Enable`を追加し、関数である`Setup Camera`を実行している場合、characterのcollisionが機能せず地面に埋まってしまう問題があります。

- Gameplay Camera
- Setup Camera
- `DDCVar.NewGameplayCameraSystem.Enable`

```sh
[/Script/Engine.DataDrivenConsoleVariableSettings]
+CVarsArray=(Type=CVarBool,Name="DDCVar.NewGameplayCameraSystem.Enable",ToolTip="",DefaultValueFloat=0.000000,DefaultValueInt=0,DefaultValueBool=True)
```

`Setup Camera`を実行しないようにするか、`DDCVar.NewGameplayCameraSystem.Enable`をfalseにします。

20 changes: 5 additions & 15 deletions book/city/01_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ game engineのmapは基本的に平面で作られています。どこまで行

海には境界があってそれが惑星システム(planet system)を構築する際に邪魔になるので消します。

## ocean wavesで惑星の海を作る

[ocean waves](https://www.unrealengine.com/marketplace/ja/product/ocean-waves)

必要なものを`/Content/OceanWaves/Levels/EarthSizedOceanPlanet`からcopyして持ってきましょう。

- `BP_EarthSizedSphericalMesh`
- `BP_EarthSizedOcean`
- `WaterVolume`

`BP_EarthSizedSphericalMesh``transform-location-z:-63600000`にします。`Sphere Radius:63600000`にします。`SphereEdge Length:16000000`になるはずです。

次に海上の影問題を修正するため`Material Overrides`, `Material Outer/Inner`をすべて変更します。私は`/Vefects/Water/VFX/WaterMaterials`を使用しました。

次に`BP_EarthSizedOcean``Volume Maaterials``WaterVolume`をセットします。`Above/Underwater``/Vefects/Water/VFX/UnderWater`に変更します。`height:0`にします。これは海に入って出たときに海中を適用する高さを設定します。
`/Map/Small_City_LVL`を使います。`GroundCollisionCube`,`DroneBlockingVolume`を探して削除します。これは海面にplane(平面)を設置しています。

## ultra dynamic skyで天候と惑星を作る

Expand All @@ -41,3 +27,7 @@ game engineのmapは基本的に平面で作られています。どこまで行

- `BP_Earth`: `transform-location-z:-636000000`, `transform-scale:6360000`
- `Sky_Sphere_Mesh`: `transform-scale:50000`

## ocean wavesで惑星の海を作る

[こちら](/plan/03_ocean.html)
Loading

0 comments on commit 5578955

Please sign in to comment.