Hello dear other UE5 Devs,
The Title basically sums it up already very well. I will support some additional screenshots here and further go into detail in the hope that some of you that are more talented than me can help me out.
My problem that needs a solution:
I’m making an Inventory UI, I’d like to use rendered images of 3D objects I’m using ingame instead of tediously creating images in photoshop and importing them to the game.
what I tried so far:
I followed some tutorials on how to use the SceneCapture2D, render that to a texturetarget and use it inside a material which I then use inside the Widget.
Inventory UI, using the Widgets
Mesh and SceneCapture2D
But I not only have one mesh but I could technically have 100 or more. I could add a Silencer or other attachment to this or other meshes and it should correctly display in the Widget.
So basically what I need:
So instead of preplacing all the components needed, I’d like to dymically create those rendered textures and set the brush of the image from a dynamic material instance.
what I think has to be done when an item Widget is created inside the Inventory:
- Create the Mesh somewhere in the world, outside the sky box
- Create the SceneCapture2D
- Create and Set the Texture Target
- Create the Material
- Apply the Material to the Widget’s Image Brush
So I tried around, watched some other tutorials but I couldn’t figure it out. There is a tutorial on Portals, they used scene capture components inside an actor blueprint but it wasn’t covering widgets, the material was very complicated and also used Niagara. That was too much for my Unreal Engine newbie brain.’
I hope someone can give me a detailed guide on how I could solve this particular problem.