Optimize the performance of PBR on mobile

Hello everyone, I recently tried to run full-scene PBR materials on low-end and mid-end phones. I find that the default PBR material is very performance consuming. So I studied Unreal Engine, unity3D and Google’s Filament engine to optimize and improve BRDF at various stages. Here are some displays:
First, the default standard PBR material:


Approx Specular + Approx IndirectLight:

Approx Specular + Approx IBL:

NormalizedBlinnPhong + Approx IndirectLight:

NormalizedBlinnPhong + Approx IBL:

I know there are many differences, but considering the use of full-scenario PBR on the mobile terminal, approximate BRDF is more cost-effective than standard BRDF. :grinning:
The following is the frame rate of the standard PBR rendering of about 200,000 triangles in the whole scene, which is about 25-30:


Using approximate BRDF and approximate indirect light, the rendering frame rate is 60 frame rate:

This is running on a low-end device. :grinning:Although there is a distance between the approximate scheme and the standard PBR, the effect is still better than Phong illumination, because indirect light and energy conservation, and the approximate BRDF equation are considered.
Can I merge it into the default PBR.glsllib? The current code is here:
shader
reference:
Unity3D optimizing LH
The Blinn-Phong Normalization Zoo
unreal4 D,Approx

7 Likes

Nice , I also have some fps & performance problems in Android especially with BloomFilter & LightScatteringFilter is not working

I have doubts. Phong plus baked light maps I think would look better. The bottom image looks very washed out and feels like something is wrong with it.

…would be interesting to see the comparison of best phone settings against this one.

1 Like

You are right, carefully adjusting the texture, Phong lighting can indeed achieve great results.
Approximate BRDF is a fast solution, I also tried Phong lighting with environment mapping, it may be better than approximate BRDF.
I am still studying more other approximate alternatives to BRDF on mobile.

The 3.3.2 version already fully supports GLES3.x, I have tried to test the post processor on the mobile terminal, the default Bloom has been supported, and the shadow is also supported.
It is recommended to enable 8 downsampling when using the default Bloom to ensure a high frame rate.


Jme3.3’s mobile terminal support has been nearly perfect, but many shaders do not consider mobile terminal optimization. :slightly_smiling_face:

5 Likes

What’s that ?

Yes , it’s supported but it kills off the fps

Besides , I am using Android studio not the SDK , I wonder if there is different results !

For BloomFilter, you can try to reduce the sampling rate, for example, reduce it 8 times.
For shadows, ShadowFilter consumes a lot of performance, so use ShadowRenderer instead.
I wrote a Lightmap baking program myself, but it is not perfect yet. I use it to bake static shadows.


I will release this program and source code to the store when it is perfected, it will automatically create the light uv and light map, just open the j3o file and bake it. :slightly_smiling_face:

5 Likes

@JhonKkk would be nice if you publish your version of PBR material for mobile on to JME store :slightly_smiling_face:

Cool :+1:

By the way, the above screenshot of the “ancient Asian palace and swordsman” looks very nice. I am working on a game with similar Asian theme. Is it from the game you are working on? Interested to know more about it.

1 Like

Yes, the game is currently in the prototype stage; in addition, I am still porting the android version of “Counter-Strike Online”:


By the way, I look forward to the game works you are developing. :+1:

5 Likes

I have submitted the relevant content to the store and it is under review. You can also check this link:MobilePBRLighting

2 Likes

Thank you.

:grinning:

@JhonKkk have you tried EnvironmentCamera or 360SnapShots with LightProbeFactory with PBRLighting matDef in Android ?

Using LightProbeFactory in java code does not work in android. You can only add light detectors in SDK SceneComposer to bake indirect lighting in advance.

1 Like

Texture compression, eg.: DXT1 or DXT5(thou not sure how wide DXT support on android is), is often overlooked.