About refraction on ios

I have found that the refraction(distortion)works in mobile preview(es2) and on ios devices(e.g iphone6 plus) with metal disabled,if I enable metal,that never works,neither does DOF(it will crash the game on ios with metal enabled)…I cannot imagine that one feature can be rendered correctly only on es2 not the metal.When will it be supported?Thank you very much!

Hello his333555,

So, from what you describe you have created a project using the IOS preview. You then enable the mobile preview(es2). With metal disabled refraction works and the opposite for when it is enabled.

I created a test project following these steps.

1.) Opened a new project in 4.9
2.) Created a blank project
3.) Added a sphere to the project
4.) Created a translucent material with a base color, opacity, refraction, and just for tests a metallic value.
5.) Then I went to Editor Preferences > Experimental > Rendering and enabled the Metal/High - end mobile render
6.) I applied the material I made to the sphere in the project.
7.) I see refraction happening as expected along with the metallic values in the viewport.
8.) I then played with IOS preview to see if there was any difference between the viewport and the play window.
9.) Again I saw refraction occurring as expected.
10.) I then added a post process effect and set it to unbound
11.) I added a depth of field method using the BrokehDOF option
12.) I set the Near and Far Transition Region to 50 and 100 Respectively and the Scale to 2
13.) DOF is working as expected in both the viewport and play in IOS window.

Screenshot of Options to enable.

Screenshot of Metal and refraction occurring on sphere in viewport.

I am unable to reproduce this issue on my end. Please let me know if any of the steps above differ from the ones that you use to create this crash. Also if UE4 does crash, you should receive a crash window with your computer ID. If you can recreate this issue then please, when the window pops up, write a description and report the crash. After that if you would link me your machine ID. I can then report it using our database.

Thank you,

Sorry for that I did not explain well.I mean on actual ios device(such as iphone6 plus) the refraction and the DOF(it will crash the game) not work when I package with metal enabled in the project settings.

Hey,

Thank you for informing us that the issue is occurring on the iPhone 6 Plus. I have submitted a for the crash that occurs from the forward rendering with metal causing a crash. This can be referenced as: UE-21000.

I have also verified that refraction does not work correctly on Android or iOS devices. I have submitted a for this as well, which can be referenced as: UE-21001.

I tested the DOF as well. While it is showing up on the devices, it’s not as strong as it is on the mobile previewer, or what you would see by launching onto Windows. You may need to strengthen the scale a bit if you’re not seeing a difference.

If you have any further questions, please let us know. Have a great day! :slight_smile:

You can enable DOF on iphone6 plus after packaging with metal enabled without a crash?Once I package ios and check the metal in the ios project settings and deploy to ios devices, the game will crash immediately.

By the way,I cannot find a setting in ios project settings to change texture format from PVRTC to ASTC,(In 4.7 release,there’s a update log saying that I can change packaging texture formats in the project settings)I think in ASTC,both the DOF and the refraction will work.
Thanks!

Hey,

The metal settings are causing the crash. I was able to load up the application with DOF as long as the metal settings were not selected in the settings. Regarding the texture format difference, the only option I see for PVRTC or ASTC is under File > Package Project > Android > Android PVRTC or Android ASTC. I do not see this option for iOS.

However, the release notes state: “New: Added ASTC texture support for Metal on iOS (Android coming soon). Enable via an iOS project setting (you can cook one or both PVRTC and ASTC).”

With that being said, it means that ASTC texture support for Metal on iOS was added.

So how can change to astc in editor settings?And when will the metal support dof without a crash?Thanks!

I found that the DOF still crashes the game if metal is selected…

Ok, so if you’d like to change the texture from PVRTC to ASTC, you’d need to go into Edit > Project Settings > Engine > Cooker.

I too noticed that Metal iOS caused a crash with the engine. This has been entered into , which was mentioned above as: UE-21000. This issue is on our ‘to do’ list and it’s assigned to a Developer to resolve. At this time I cannot say which version of the Engine it’ll be included in.

Thanks!

Thanks for your reply!I have navigated to the cooker settings but I did not see any checkbox which can be checked to toggle PVRTC and ASTC for ios…

It’s not going to be a checkbox for iOS, you’d change the settings on how you’d like the textures to be compressed.

OK,I‘ll try it out.Could please help me take a look at this link?
I’m really confused at this now.Thanks very much!