gottu
(gottu)
March 15, 2025, 2:55pm
1
お世話になります。
1.FBXをした時に通常マテリアルはマテリアルでインポートされますが、このマテリアルについているテクスチャ情報をもとに、自分で用意した親マテリアルをもとにインスタンスを作成してテクスチャを適用してインポートを完了させたいです。
デフォルトでマテリアルインスタンスを作成するオプションがありますが、テクスチャ情報を追加できないので作成しようと思いました。
event scripted execute pipelineの中でconstruct interchange material instance factory nodeで作成してみてもプレビューに出てきませんでした。やり方が違うのでしょうか。factory nodeを作成できればその後アセット化してくれるのかと思ってやってみましたが駄目でした。
2.インポートするスタティックメッシュのもつマテリアル名と、事前にアセットとして用意してある既存マテリアル名が同じマテリアルをすり替えたいと思っています。event scripted execute pipelineの中でstaticemeshfactorynodeのslot material dependenciesのelementを既存マテリアルのUIDを設定しても変更できませんでした。
どこかに詳しいサイトはありませんでしょうか。
意味が分かりますでしょうか。
よろしくお願いします。
Not sure it is exactly what you want, however:
You can make a custom material and if you use specific custom parameters name then UE will fill your material instance properly with the data coming from the FBX.
e.g.: DiffuseColor, DiffuseColorMap, DiffuseColorMapWeight. You can have a look at /InterchangeAssets/Materials/PhongSurfaceMaterial OR /InterchangeAssets/Materials/LambertSurfaceMaterial for example of parameter values you can use.
I can make a custom material like this, and then I import the FBX with “MaterialInstance” and using this Material as my master material. UE will attached the texture as it would have done with default material
You can try something like that. First line is to deactivate material node so it does not create unwanted material. Second line is to replace material on created asset.
Interchange Custom Pipeline - Deactivate Material Node and replace material on static mesh posted by anonymous | blueprintUE | PasteBin For Unreal Engine
gottu
(gottu)
March 18, 2025, 2:29pm
3
thank you.
i have 2 Questions.
interchange material factory node → set enabledはインポート時にpreviewでオフになっていたので確認できたが、そのあとのノードcreate user defined attribute F stringの結果は確認できないのでしょうか。
i tryed. but The “load asset” node doesn’t appear.
get asset registry → get asset by object path → get asset → cast to material でも大丈夫か。
event scripted execute post import pipeline - created asset → cast to staticmesh につなげるset material が出てこない。interchange pipeline base classで使用可能か。
現状、あまり進まずFBXをインポートしてstatic meshのマテリアルがworldgridmaterialになっている状態です。
gottu
(gottu)
March 18, 2025, 3:33pm
5
変更してみました。できました。
Interchange Editor Blueprint Pipelineでできました。ありがとうございました。
これで作り込んでみます。
またマテリアルについては再考します。
ちなみに、
1.このパイプラインの中で新規にマテリアルやマテリアルインスタンスを作成しようとしたらどのイベントで作成するのでしょうか。execute pipelineのなかでconstruct でinterchangeMaterialfactorynodeで作ればその後に作られるのでしょうか。
2.こちらのinspectorでみる左側のアイコンはグレーです。カラーにならないのですがなぜでしょうか。
gottu
(gottu)
March 19, 2025, 1:57am
6
すいません、追加で。
3. project settings のinterchenge - import contentに追加してfbxをインポートでは機能しているようですが、import into level にも追加したのですが、実際実行してみるとパイプライン処理が走っていないようです。fbx importの時のようなプレビューボタンもないです。何か違うのでしょうか。
project settings → interchange → import content → content import settings → pipeline stackes → Assets → pipelines → index[1]に追加しました。index[0]はデフォルトのままです。
project settings → interchange → scene import settings → pipeline stackes → scene → pipelines → index[2]に追加しました。index[0],[1]はデフォルトのままです。