I have a modular crafting system where players select icons/images to build their weapons.
Currently the icon for the new weapon is just an icon the user selects from a library of icons.
I’d like the icon to be generated either by somehow taking a screenshot of the 3D composite mesh with all the parts the user has selected, or by combining image of all the weapon parts together and saving that as a new image that would be used as the icon for the new weapon.
Greetings Aininia, thank you for posting this question.
I would consider using a ScenecaptureComponent2D for your weapon building blueprint. In the texture target value, I would then create a render target. Then I would right click the render target in the content browser and ‘Create Material’ from it. I will include an image.
In my example, I am using an eight sided die with a ScenecaptureComponent2D aimed at it. This is where you may want your weapon (or something to that effect.) I put a plane there because I needed quick results. I then set the ‘Capture Every Frame’ and Capture Movement’ values to false.
In the content browser, right click the render target you made earlier and create a material for it.
Back in your BP, I used a Create Dynamic Material Instance node and set the material I just made. Then I set the material for the plane.