Any idea with Scene Captures turn green after you change resolution/video settings?

They both turn green and stay green (no longer recording from the environment) which is kind of a problem if you want to have video settings accessible while playing.

Maybe there’s a way to reset them or something? Anyone else encounter this?

I noticed a green color in udk when starting a game(not scene capture related) and changing resolution but this is due something strange with NVidia drivers.It gets fixed just by moving the camera view away for a sec from the green object and its fixed.I suspect this might be the same issue with you.To reset the scene capture, you can use the kismet node to change/set material(cant remember the name).Just in less than 1 second, change the material to anoter one and return the original back.Maybe conect that node to the change resolution you have as I said, I suspect its a NVidia driver problem or a windows 10 one.

If you move away your player view away from the green scene capture and than look at it again, does that fixes it?

when changing the resolution the buffers get reinitialized so all capture data is lost. for captures where you only capture at a single time (i.e. on first frame) you need to recapture them. if the capture is permanently enabled it should simply work on the next frame but perhaps you need to turn it off and on

Thanks, I will definitely try enable/disable with a small delay.

Hmm, well that doesn’t fix it. I’ve used this function “simulated native final function SetEnabled(bool bEnable);” to turn the captures off and on multiple times, first false, then true, and nothing changed, they’re still showing the default color.

Is there some other way to reset camera captures? What is even up with this bug.

Also here’s some footage of the game (and capture) working properly if it helps

what is the scenecapture’s framerate set to?

it’s set to 60 frames
you think that value could get reset to 0 or something after a resolution change?

nah, just wanted to make sure you didn’t set it to 0 fps :slight_smile:
at this point I don’t know then. maybe post the full settings of your scenecapture to see if there’s anything suspicious.
also maybe post the rendertarget settings. and is it an editor rendertarget or do you create it dynamically via code?

it’s set up in the editor, i’m not sure how you would create it dynamically, but that could possibly be a fix. attached my settings.

thanks for the support with this thingy

How would you go about creating scene captures dynamically in code anyway? I can only find the ‘from editor’ technique on this page UDK | RenderToTexture

Does your scene capture has some complex custom material on it? There are certain effects that cant be rendered by the scene capture.(not that it matters much)
Did you try to reset the scene capture using the kismet node set material as I told you?Just change it to something simple for 1 sec and reverse it back.On the other hand its strange that your ships look fine but only the background is in green.The ships look 2d.Are you using a low FOV on the camera to make them look flat?

Just off topic, your game looks cool man!!! I always loved the old neo geo aerofighters games!

Yeah there is a custom material but it’s not too complex, it renders just fine normally.

I tried to use the kismet node material but it doesn’t fix it, I switch to a black material, that works fine, then I switch back to my rendering material, and it’s still green.
(yes I did use a low fov)

Thank you, I hope to put it out there soon.

making a rendertarget in code is easy:


yourRenderTarget = class'TextureRenderTarget2D'.static.Create(sizeX, dizeY, PF_G8, MakeLinearColor(0, 0, 0, 1));

maybe the issue is in your material. do you use the rendertarget inside it?

by now I’d try to create the rendertarget by code, and re-create it and re-assign it every time the resolution changes

also, does the issue also occur if you alt-tab, or if the user switches between fullscreen and windowed? (do you even have that option?)

I’ll give that code a go tonight, thanks.

It could be the material, I’ll post an image of it if I can’t get this fixed.
As far as I can tell the bug only occurs if I change resolution, if I alt+tab, the screen capture will still go green for a bit, but it recovers immediately, or as soon as the game is unpaused.

Oh, no, it was my fault all along guys. Sorry for the time wasted.

I wrote some code a few months ago which changes the render target depending on the resolution you selected, and was too lazy to create those objects (one for each resolution, basically) at the time, meaning an non-existent render texture is selected causing the green mess to appear.
This is what you get when you work on a massive project all by yourself :frowning:

oh. yeah I know unreal doesn’t really fail at that so I suspected something fishy :stuck_out_tongue:
glad you sorted it out

Well… it still shows you an awful green mess until you unpause if you tab out while the game is paused, with no way to set a more sensible color that I can find since capture camera fill color does nothing, but that’s bearable I guess.

if you spawn your rendertarget via code you should be able to swap the rendertarget clearcolor (default green) for any color you want. in the code I posted above you can see I used MakeLinearColor(0, 0, 0, 1) which is already making it black
though I seem to remember this was also something you could set in the editor (in the rendertarget asset itself)