0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【UE5】UIにMeshを表示する

Last updated at Posted at 2025-02-19

やりたいこと

レベルに配置してあるCharacterをUIに表示する

環境

Windows
UE5.3.2

RenderTextureを作成する

ContentBrowserで右クリックしてRenderTextureを作成、適当なサイズにしておく。

マテリアルを作成

マテリアルを新規作成して、

  • Material DomainをUser Interfaceに変更
  • Blend ModeをTranslucentに変更
    スクリーンショット 2025-02-18 232053.png
  • 上記で作成したRenderTargetをサンプルして、以下のようにノードを繋ぐ
    スクリーンショット 2025-02-18 232239.png

SceneCaptureComponent2D

  • CharacterにSceneCaptureComponent2DをAddする
    スクリーンショット 2025-02-18 230122.png
  • Texture Targetを作成したRenderTextureにする
    スクリーンショット 2025-02-18 230232.png
  • SceneCaptureComponent2Dの位置を調整してキャラクターが映るようにする
  • Character Blueprintを以下のように組む
    スクリーンショット 2025-02-18 233907.png

UIを作成

  • Widget Blurprintを作成して、Imageが表示できるように適当にUIを組む
  • ImageのBrush→Imageに上記で作成したマテリアルを設定する

スクリーンショット 2025-02-18 232811.png

結果

スクリーンショット 2025-02-18 234204.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?