So, I’m trying to use a Scene Capture 2D for rendering reflections, but I don’t want to have to manually set up a new Render Target for every reflective surface. Instead, I made a blueprint that used a Canvas Render Target 2D (the only Render Target available in Blueprints, it seems), created dynamically, to render the reflections onto. However, this did not work when played in a standalone window. I changed this out for a Render Target asset, only to find, to my irritation, that I can’t create these at run time, or even change settings such as the size (so I can scale the Render Target down to improve performance for lower-end machines). I would like to be able to configure all my settings from the one blueprint, to aid the workflow. Is there a way I can do this, or is it just not possible?
Hey Hoeloe -
You cannot create a texture at runtime in blueprints. You can however do it through a C++ implementation, a user has posted a wiki detailing a possible implementation, A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
That’s a shame. It’s a pity there are so many functions missing from Blueprints, especially when it’s just a case of creating an object.
Out of interest, is it possible to change the size of a Render Texture? I know you can change most of the parameters, but the resolution doesn’t seem to be one of them.
Can we store a single render target texture for each object individually, even without saving textures on a disk? Just to keep the texture information (some texture object?) in memory that would exist only at runtime.
Something like this would also be very helpful for creating things like @Hoeloe
For example, let’s say we have procedurally generated people, so every person has random face, hair, etc. They all want to take a selfie and store it in their pockets until the game session ends/next level loads.
Is there some way to achieve this with blueprints?
There is now a static node called Create Render Target 2D which can be called from Actors and Components. You can supply the desired Width and Height.