cancel
Showing results for 
Search instead for 
Did you mean: 

best practices for mobile performance

Agua
Honored Guest
I'm using unity. A scene I will be building will include lots of foliage, grass, flowers, etc.
For all the plants and leaves I want to texture with alpha transparencies.

The best practices in mobile documentation says that alpha cutout shaders have a high performance cost, and it is better to use alpha blended.
Is it an absolute no go to use cutout shader on mobile? I really the need the cutout shader so to avoid the transparency sorting issues that come with alpha blended. there will be lots of overlapping foliage.

Also the guide says to "keep alpha blended transparency to a minimum." its not really specific. Does this mean not to use a lot of different overlapping geometry?

I would test this myself but I dont have access to a gear vr device.
8 REPLIES 8

DeeKej
Explorer
Mobile in general isn't very powerful, so I'd guess they have it in the guide to just let devs know that "hey, you probably won't have much of anything else running in your app/game if you use it". 😛 It's not that it doesn't work, it's that you won't have a good time making it run smoothly.

Foliage should be avoided or kept to a minimum, or you'll be spending a lot of time just getting your program to run smoothly on mobile. Edit: Btw, I'm not trying to shoot down your idea, just be aware of the consequences of having lots of foliage for a mobile platform! 🙂 Would be cool if you make it work on mobile.

sfaok
Protege
Overdraw's the main problem I think - if you line up a bunch of grass blade quads in a row the device will have to redraw the scene over and over etc.

For Ocean Rift I ended up modelling (sea)grass bushes out of polygons, and then applying a vertex shader that swayed them back and forth. I only had to worry about a draw distance of <15 meters there though!
Developer of Ocean Rift. Follow me on Twitter @sfaok

Gerald
Expert Protege
Since you do not have a Gear to test with I would stay conservative - no point in participating in a Jam if you have to redo half the project last minute or fail due to not hitting a comfortable framerate.
This is VR, so if your project stutters they will very likely just put it on the "do not even consider" pile!
check out my Mobile VR Jam 2015 title Guns N' Dragons

Agua
Honored Guest
thanks for the information. I guess the alpha foliage won't be an option in this case. I'll try to model everything instead.
So 50k to 100k triangles is reasonable for a single scene? I think I can manage with that.

sfaok
Protege
"Agua" wrote:
thanks for the information. I guess the alpha foliage won't be an option in this case. I'll try to model everything instead.
So 50k to 100k triangles is reasonable for a single scene? I think I can manage with that.

Yes you can hit those numbers if you make most of the scene static, bake everything into lightmaps, keep draw calls <100.
Developer of Ocean Rift. Follow me on Twitter @sfaok

Gerald
Expert Protege
"Agua" wrote:
thanks for the information. I guess the alpha foliage won't be an option in this case. I'll try to model everything instead.
So 50k to 100k triangles is reasonable for a single scene? I think I can manage with that.


If that is an option you really should go that route!

I try to keep it under 100k (50k monoscopic => 100k stereoscopic) and under 100 drawcalls ... so far I have been able to activate 8x AA on the eye textures and it makes a big difference. So maybe consider aiming a lot lower than the 100k/100draw values.
But to see what you can do you need to have access to a GearVR!
check out my Mobile VR Jam 2015 title Guns N' Dragons

RyuMaster
Honored Guest
Its really good idea to keep performance in mind all the time. I think you absolutely must have stable FPS for Oculus, and we are talking about mobile here. When you will plan your game, build it around the idea, that you must have limited amount of visuals - no exceptions. And the faster you will grab real device and Gear VR to test it, the better it is. Only real tests can tell you the limit boundaries. I'm telling the obvious here, but this is a must 🙂

thorohtech
Honored Guest
Personally I think that Mobile VR puts us back a little bit in the (at least for me) good old days in the beginning of the 90's where performance was limited and you had to optimize in every step and way possible. The demo scene was continously pushing the boundaries here and I am happy to have experienced it.

As developers learn the rule set of Mobile VR (and the manufacturers of CPU/GPU) I am sure that we are going to see wonderfully designed experiences that will awe the world.