Closed4

Send to Unreal の Document を (ちょっと) 読む

Yoichi DanYoichi Dan

Quickstart

https://github.com/EpicGames/BlenderTools/releases?q=Send+to+unreal&expanded=true

上記からダウンロード

Blender 側

Blender にインストール

UE 側

UE 側の Python Editor Script Plugin を有効化

If you are also working with groom assets and would like to export alembic files from blender as unreal groom assets, make sure to also have the plugins "Alembic Groom Importer" and "Groom" enabled.

今回は groom assets は利用するつもりは無いのでこちらは有効にしない

Project Settings の Python Plugin の Enable Remote Execution? を有効化

Editor Preference の Use Less CPU when in Background を無効化

Search for "CPU", then under Editor Performance disable "Use Less CPU when in Background". That way unreal continues to update even when it is not the active application, which means the Unreal user interface will update constantly, and you will see your changes update without having to click on the Unreal Editor.

これを見る限り、有効にしておきたい気持ちになるけどたぶんこのユースケースでは Blender がアクティブな状態で処理が行われるから都合が悪いのかな。

動作確認

UE側にフォルダを作成

それに合わせて Blender 側のエクスポート設定。
エラーメッセージがでているが合っていれば問題なし。

成功した。

Quickstart ページはこれで終了。

Yoichi DanYoichi Dan

https://epicgames.github.io/BlenderTools/send2ue/settings/paths.html

The Paths section of the settings dialog is where all export and import paths can be configured. There are several different paths available depending on which Path Mode is selected

export と import の paths がある。Path Mode なるものもある。export は分かるが import って何?

Path Modes

Select which path mode Send to Unreal should use

これが Path Modes のようだ。

Send to Project

Sends the intermediate files to a temporary location on disk and then imports them into the Unreal Project. This doesn't require any extra configuration, but might not be ideal if your intermediate files need to be under source control.

intermediate files として一時的な場所に送って、それを UE プロジェクトに import することらしい。
追加の設定は必要無いが、intermediate files をソース管理する場合は理想的ではないとある。

https://docs.unrealengine.com/5.3/ja/managing-game-code-in-unreal-engine/

プロジェクト ファイルは「中間ファイル」として扱われ、「PROJECT_DIRECTORY\Intermediate\ProjectFiles」に保存されます。つまり、「Intermediate」フォルダを削除した場合は、プロジェクト ファイルを再生成する必要があることを意味しています。

想像するに、プロジェクトの intermediate として吐き出すので、それをソース管理している場合はそこに差分が入って邪魔になるってことかな。

intermediate の中を理解できていないのでよくわからない。

Send to Disk

Sends the intermediate files to a specified location on disk and does not import them.

さっきのと比較するに、おそらく中間ファイルは任意の場所に出力して、それを自分で UE に import しましょうということか。

なるほど、普通に Export にある MESH ごとに fbx が出力された。

Send to Disk then Project

Sends the intermediate files to a specified location on disk and then imports them into the Unreal Project. This requires extra paths to be configured, but is ideal if your intermediate files need to be under source control.

ここまで来ると予想通りではあるが、fbx を任意の場所に出力でき、かつ UE Project にも Import される。

Relative Paths

When specifying a location on disk with either the Send to Disk or Send to Disk then Project, relative paths can be used if the blender file is saved. The paths are relative to the currently open blender file.

Path Modes で Disk への任意の場所を指定する場合には Blender file からの相対パスが使えるようだ。

Path Properties

Mesh/Animation/Groom Folder (Unreal) に関しては、import 先の UE Project 内のパス。

Skeleton/Physics Asset (Unreal) に関しては、animation を import したい skeletal mesh や physics asset を直接 UE の対象に指定できるよう。使ってみないとわからないなぁ。

Mesh/Animation/Groom Folder (Disk) は Disk の出力先パス。Mesh だけ以下のように maya の名前に関連している。どういうことだろうか。

The file names will match the name of the mesh in maya

Settings の Paths はここまで。

Yoichi DanYoichi Dan

https://epicgames.github.io/BlenderTools/send2ue/settings/export.html

続いて Settings の Export。

Use object origin

This forces the unreal asset to use the blender object origin instead of the blender scene's world origin.

origin を blender のシーンのものではなく各オブジェクトのものにする。
こちらはデフォルト false。

複数で構成されている場合はシーンのオリジンでないと、UE に持っていったときに合わせられないから false のほうがいいか。

Export object name as root bone

If true, this uses the armature object's name in blender as the root bone name in Unreal, otherwise the first bone in the armature hierarchy is used as the root bone in unreal.

root bone か armature hierarchy の最初の bone をオブジェクト名にする。
こちらはデフォルト true。

FBX Settings

詳しくないので分からないが、Blender から UE に FBX export する一般的な設定がカスタマイズできるようだ。

Animation Settings もあるが、スキップして終了する。

Yoichi DanYoichi Dan

https://epicgames.github.io/BlenderTools/send2ue/settings/import.html

続いて Settings の Import。

The following properties dictate what and how assets are imported into unreal.
Blender への import ではなく UE に import するときの設定。

Meshes

Whether or not to import meshes from the FBX file.
FBX から Mesh をインポートするかどうか。

Materials and Textures

Whether or not to import the materials and textures from the FBX file.
FBX から Material と Texture をインポートするかどうか。

Animation

Whether or not to import the animation from the FBX file.

FBX から animation をインポートするかどうか。

Groom

Whether or not to export groom as an alembic file and import to unreal.
alembic として groom を export し、それを UE にインポートするかどうか。

Launch Import UI

When enabled this option launches the import UI in Unreal.
UE の FBX の UI を出すこともできるらしい。
reimport の時は出ないので出したい場合は一度 UE 側で削除しろとのこと。

他に LOD Settings、FBX Import Settings, Editor Settings がある。
後ろ2つについては、ほぼ UE の Python API を wrap した形になっているようで、Python API のページがそのままリンクされている。

このスクラップは2023/09/13にクローズされました