Hi,
I'm facing a challenge of optimizing graphics for mobile platform.I am referring to game like "dead trigger","Asphalt 8" etc.In those game they have great graphics but games run on even low end devices without any jerks and crashes.Any suggestion will be helpful.Also any tips about getting better workflow.
Thanks
Muhammad Adnan Malik
Replies
If you have large alpha objects, try cut out areas and define alpha/no alpha if you can (such as a tree, the middle area can be no alpha, and the outer areas can be alpha)
Possibly force a lower mipmap level to start with on low devices.
Possibly have high/low lod meshes/environments.
Get engineers to implement instancing.
But it also depends on the engine you using and having programmers write efficient code.
One good way to reduce draw calls is to create texture atlases. It is always better to load a single big texture into the memory than it is to load several smaller textures. It is advicable that you also separate alpha textures and textures that don't use alpha: create texture atlases that exclusively have alpha textures on them, and don't mix these in with the atlas consisting of textures that have no alpha.
Overdraw:
Minimize overdraw by reducing areas in your meshes that are transparent. It's easier for an engine to render a few more triangles than it is to process big transparent areas. Here is a good example (where B is correct):
(credit goes to Polycount user DII)
Alphatest vs Alphablend:
Good topic here: http://www.gamedev.net/topic/460604-alphatest-vs-alphablend/
Vertex colors and gradient mapping:
You can also reduce the texture size by using 1-channel textures instead of RGB ones. Also, use vertex colors and gradient mapping: http://oldwiki.polycount.com/GradientMapping
The good thing about gradient maps is that the color gradients can be exclusively defined in code, instead of loading another texture. Vertex colors can easily be used to fake shadows as well - either manually or by baking lightmap data to vertex colors directly.
Thanks for your help.We use unity for development.Main issue we face is we have to compromise on texture quality a lot this also reduces quality of overall graphics.I got the concept of minimum alpha space or alpha.What should be target ratio for texture means 512 x 512 or something around 1024 x 1024 will work.For meshes or in count of tri's what is a max amount for a mobile game also what are the shaders best for mobile or we have to write custom shaders.
Looking forward
Thanks
For shaders you can forget about the native ones that comes with Unity (they are garbage). Writing your own is also not a very good idea unless you have a Technical Artist on your team who has experience working with mobile shaders. When I worked at a small studio called Blackbeard we used shaders that were created by some american. Not sure if we got them via the Unity asset store or from him directly (probably the latter) but they did the job. You should consider buying some via the Unity asset store:
https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=relevance/query=mobile&shader
https://www.youtube.com/watch?v=9vZ8SfXOlpI