Create a scene and render it to a texture at runtime?
Is it possible to create some sort of scene and render it to a texture at runtime? The proof of concept I'm working on right now is to take a scene that contains a cube and render it to a texture.
I looked at UScene, but I don't think it is possible to have two UScenes running at one time. I've also looked over code that the editor uses to create thumbnail previews, but it seems to be tired to the editor.
Are there any classes that exist already that can create a scene object with a scene capture component and render that to the texture visible in the scene that the player is in?
The end result I am going for is having a 3D player avatar render to the GUI via this texture.
Checkout the 'Scene Capture Component 2D' Its basically like a camera but it renders to a texture.
I have done exactly what you want using this. Simply create a blueprint with your cube in it then add the scene capture and position as if it where a camera. Make a new texture of type render target IIRC and select it in the scene capture details. This is how the mini maps to the right of this video work:
Use the HUD texture rendering to place the texture in your GUI.
I also use this method for my posed character selection which it sounds like you want. I pose the scene out of normal camera view off map.
answered Aug 02 '14 at 07:04 AM
UMG is adding a feature where you can create a ui piece with its own uworld. Coming in 4.4 it seems.
answered Aug 02 '14 at 10:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here