Get Texture from RenderTarget
Hey everyone, I'm desperately trying to get day-night lighting to work in my project, but unreal seems to be blocking my attempts in every way.
I want to create a smooth and high performance lighting transition for a skylight, depending on the time of day. My latest effort (since simply recapturing the skylight causes performance to drop and updates to apply too rapidly) was to assign a custom cubemap to the skylight and just update the lighting via this cubemap. So, to make it more dynamic, I created a SceneCaptureCube and edited the showFlags so that only the sky would be drawn. With a 16 pixel CubeRenderTarget for the scene capture to draw into, I had a rendertarget with the proper sky representation at each time of day.
Now to the problem: In order to apply the lighting, my skylight needs the CubeRenderTarget as it's specified cubemap. But in blueprint, setting the cubemap to my rendertarget is not possible:
So, to the question, is there a way of retrieving a raw cubemap from the rendertarget to plug into the skylight, or, alternatively, is there any way at all to get decent dynamic skylight updates to work?
Hope you can help me out.
asked Nov 27 '15 at 02:00 AM in Rendering
There is actually a node within Blueprints called 'Set Cubemap Blend' which will allow you to blend smoothly between different cubemaps so you can avoid the hitching you experience when recapturing your Skylight.
answered Nov 30 '15 at 07:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here