My current use case is that I want to press a button to generate portraits for all characters that I have in a data table. Potentially it could even assign each newly generated portrait directly to each corresponding character.
How would I best do this?
For my current approach I’m using an Editor Utility Widget which sets up a movie render queue with a job per character, with the character’s internal name as the job name, the “photo studio” level as the map, the level sequence that manages the shot (for a single frame), and the file path and file name in the render queue config.
The level sequence spawns the character for the current job. The problem is that the level sequence doesn’t know about the current job, and I have no idea how to access that info, so it doesn’t know which character to spawn.
I tried alternatively to render a single job, and have the level sequence spawn one character per frame, but then I can’t adjust the file name according to the current character.
I’m at the moment on a blueprint only project, so if this is only possible with c++ I won’t be able to implement it at the moment, but I’ll keep it as reference for later.
What about using a Scene Capture 2D to render the spawned character into a Render Target?
There should be a function Render Target 2D Create Static Texture 2D Editor Only that you can use to bake the Render Target into a new Texture2D asset.
sorry for taking so long to reply. I think I could go that route, but I imagine that means I’d have to actually run the map, instead of having the render pipeline run a separate process that handles everything, no?
That is (mostly) correct.
You could avoid this by creating a temporal editor world (like the viewport in the asset editors) for capturing icons.
But generally there is nothing wrong in having a separate map just for icon staging.
Lyra has a PocketWorlds plugin which you might want to look into.
It can be used for spawning “pocket world” that are temporarily for either item icon capturing or even item inspection (like when you have a 3D model that can be rotated in the UI using your cursor)