Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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.

Product Version: UE 4.10
rendertarget.jpg (59.6 kB)
more ▼

asked Nov 27 '15 at 02:00 AM in Rendering

avatar image

6 4 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello Timothy,

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.

alt text


Andrew Hurley

more ▼

answered Nov 30 '15 at 07:57 PM

avatar image Timothy Nov 30 '15 at 09:41 PM

Hey Andrew,

thanks for your answer. Sadly, I'm aware that there is a blend function, however this node doesn't solve the fact that I can't connect a rendertargetCube node to a Cubemap node. The only way to make this function work is if I would create dozens of custom cubemaps for every time of day, which would be a bit overkill. (Plus it doesn't allow for weather changes, like cloudy days, which should change the lighting) The actual problem right now is not really the hitching, but rather taking a dynamically created rendertargetCube and assigning it to a skylight in my scene.

Is something like that possible?

avatar image AndrewHurley Dec 01 '15 at 02:36 PM

Well you are going to have to update your skylight every second which will be either costly, or tedious. And honestly, you would only need a handful of cubemaps to blend in between (i.e. morning, mid-morning, early afternoon, noon, mid-afternoon, early evening, evening, late evening, early morning). The blend will cleanly blend in between your cubemaps and you can avoid the hitching.


Andrew Hurley

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question