I have a pawn with a Scene Capture 2D component. It throws the result into a render target which is then used in a material. It all works fine on pc, even in mobile preview mode, but the material ends up black on mobile.
Am I doing something wrong? Is there a reason for it not being supported by Unreal?
me too, but not only the scene Capture 2D.
Set material to widget image on mobile has the same problem.
My sony xperia sp and tablet z1 has same problem too.
I will try it in a later version soon. Since the last time I worked on a mobile game in Unreal it was still 4.5/4.6. So it might be fixed already, canāt check it right now.
Device: OnePlus: One A0001
Donāt have the project laying around anymore, but the final test was a opaque unlit material with the texture directly hooked into the emissive input.
Just FYI, the cube renderer was also not working. I wanted to update it once when the game was loading to decrease downloading size of the app, but could not get it to work either.
Since the scene capture was important I did not end up using Unreal to make the project, it would be cool if I can use Unreal for my next mobile project though
Iām having the same problem on iOS on 4.9.2. I have a SceneCapture2D attached to a camera and a UMG image that displays the capture render target through an opaque material. On PC and mobile preview everything works fine, but on iOS the SceneCapture2D result is always black.
My project uses mobile HDR off, BTW.
EDIT:
The camera seems to be rendering, since the āstat initViewsā data shows two views being rendered both on mobile and PC. No idea why the result is black, however. All my materials are unlit.
I managed to perform a GPU frame capture on Xcode. The cause of the problem is clear: the color attachment dimensions donāt match the depth attachment dimensions, resulting in an GL_INVALID_FRAMEBUFFER_OPERATION error.
It seems UE4 ārecyclesā the main depth buffer when updating sceneCaptures but OpenGL specifications require both color and depth/stencil buffers to have the same dimensions, which means the current SceneCapture implementation is violating OpenGL specifications. It might be that previous iOS versions ignored the error and thus it seemed to work.
BTW, thereās also a crash in FOpenGLDynamicRHI::RHISetRenderTargetsAndClear() when you use SceneCapture with development or debug builds in iOS and mobile HDR off.
Iām a bit bummed that this sort of thing isnāt part of automated tests.
Thank you for taking the time to investigate this issue and report your findings on the potential cause. For the crash issue, could you please create a new post with some reproducible steps and as much information that you can provide so we can get a fix for that implemented?
If you need help in regards to the information we will ask for when reporting a crash, we have a helpful guide on our Forums about How to Report a Bug
In regards to the issue of the Scene Capture 2D on Mobile, it seems you have found a solution, and you sound tech savy enough to enter a Git Hub pull request for the fix. I suggest taking this route as it is usually faster to get a fix into the engine when the fix in the code is provided by the user. Let me know if you are unsure how to generate a pull request and I will provide some instructions.
I just managed to come with a solution for both issues, yes. I could use some help in creating pull requests. I have both changes in our company branch, but Iām not sure how to create a pull request with only those changes (github tries to push the entire branch - Iām more of a SVN person so Iām probably not using GIT as it should be used).
I personally donāt know a whole lot on generating a pull request, but I am good at finding the information on how to do so Use the documentation below, but let me know if you have other questions and I can direct them to someone who is a bit more experienced with generating pull requests on GitHub.
I multiplyed the captured scene because otherwise it would be all black: even if I donāt connect the captured scene to the emissive node and use a higher multiply on the base color I got⦠itās difficult to describe, imagine to add brigthness to an image in Photoshop until itās completely burnt and then make it semi-transparent on a full-black layer! but on the other hand I multiplied just a bit on the emissive and Iāve already got this huge flash! And Iāve set the bloom of the āscene capture 2dā to 0 to try to avoid the flash problem but it seems it has no effect!
Iām working on a 4.10 for iOS too (iPad Pro in my case)
Could this be helpful? or is it just a problem for me because the problem posted here was already fixed?
I appreciate the detailed explanation and screenshots you have provided. I think what could be the issue is that you arenāt looking through the SceneCapture2D camera in your last screenshot, but rather the active player camera. You need to be sure to disable ābloomā on the camera component inside of your character blueprint.
You could also add a Post Process Volume to the scene and disable bloom that way as well. Let me know if either suggestion resolved your issue, or if you need further assistance.
Great intuition! I disabled it from the player camera and now Iām not flashed!
Now the problems are just related to the fact that the āreflectā is from a camera, so even adjusting the field of view will however be quite irrealistic, and that looking at the mirror too sided you see the mirror itself reflected or, even worse, behind the wall of the mirror!
It is all going to just take some tweaking and a bit of magic to fake the reflection. Using a real reflection on a flat surface wonāt produce the results you expect because reflections work best on surfaces with varying normals and roughness.
āa bit of magicā uh? Iām finding hard to believe it! xD
From a noob view itās kinda hard to find a realistic reflection with just the field of view to set, but I promise to continue working on it: for now it should be easier to have a realistic result without objects near the mirror or mirror surfaces too big, isnāt it?
Yeah, at certain angles you will have issues. Game design is all about using the techniques you know in order to achieve the affect you are going for. Not everything is going to be realistic in terms of set up, and more often than not, you will have to find ways to fake effects.
Could you please make a new AnswerHub post pertaining to your issue. This one was resolved and for tracking purposes we want to make sure issues do not get conflated.
Post it in either Bug Reports or Packaging and Deployment, with a description of your issue, how you reached that point, and your system specs. Once this is done, either myself or a team member will assist you.