Can't get Scene Capture 2d image to display properly in HTML5

Hello, we’re creating an Html5 project and are trying to save out an image of the screen in browser. We are using Scene Capture 2d to take a screenshot of the viewport on the web and are convert this capture to a RawPixel array in C++. When we try to use the created image, we end up getting an image like this:

We are getting this error in the Chrome Developer Tools: WebGL: INVALID_ENUM: readPixels: invalid format

Does anyone have any idea what could be going wrong? The image works correctly when inside of the editor and when packaged for anything but HTML5.

Thanks!

just out of curiosity, does this work on firefox?

Sadly, no. I’m getting the same image out of there.

ok, i’m trying to run one of our test maps (ContentExamples – with Reflection level) but, there seems to be a bug with the memory system and ICU initialization that’s preventing me from running this…

i will get back to this after a little bit of vacation time (mid march). apologies for the delay.

Great, I’ll be sure to comment if we can get anywhere in the meantime. Thanks for the help, have a nice vacation!

Any update here, having exactly the same issue in a HTML5 build ?

ok, i must admit - i’m a programmer and not a designer… so i followed the tutorial at:

this uses “Scene Capture 2D” – and i just tried this on 4.19 (hot off the press!) and the step by step instructions worked when i packaged for HTML5.

1 Like

How did you send your Render Target? I would like to send the array od two render targets via TCP, I managed to do that with a C++ class, but maybe it’s possible also via Blueprint or in a more trivial way.