- Home /
Performance woe - full log given
Target Platform : >iPad2
Top-Down view
Gameplay :
My game is set in such a way that the player moves from the top to the bottom. He travels around the leaves and branches untill he reaches the ground.
Requirement :
I would like to have trees and branches on the level as they are a very important part of the gameplay.
Problem :
Hence as branches were required, I went on to use the unity3d trees and placed one. I bought the tree from the asset store. It had around 2500-5000 tris. The device just choked. I also read the data from the device during it's most choked moment and it read like this.
Expectations :
As branches are very important part of my gameplay, I really need to find a way to fit branches and leaves. I would also like to find an optimal way.
I require some assistance, with the best you devs could offer. I am not able to think beyond as of how to accomplish it.
Thank you.
EDIT : The Scene is something like this :
Those are the branches and the cube is the player. The branches do not posses any leaves for the moment. It is just a blind prototype of how the scene would be. You are also looking at X-Z axis. Please note that the above stats do not resemble with the above picture. The above picture does not have leaves whereas the stats was taken out of iPad with leaves and branches. The picture is just a image to show how the scene is oriented. If I am not defined, pls let me know. I will try to provide a better definition.
Fattie - I have updated the question and so did I use the "amazing add photo" button :) . Hope I get some answer.
liszto - I mean this => http://docs.unity3d.com/Documentation/Components/terrain-Trees.html
It's pretty pointless to use terrain trees in this case. Even the use of the terrain seems quite pointless since it's top-down. It looks like you just have one tree, or at most "some" trees. The terrain engine is designed to render thousands of trees on the terrain. The point of the terrain engine is an automatic level-of-detail switching.
You probably will get way better results when you just put the tree mesh in the scene as normal gameobject. Also the ground can be a simple plane. The terrain-engine uses quite complex shaders.
Bunny83, I use the terrain engine to give LOD functionality as it could help me in the future. There are lot of leaves in my environment and I would have to do some sort of LOD functionality. $$anonymous$$oreover, as I am moving so close to the leaves, it clogs a lot of fillrate. EVery the Unity Doc say that it uses a lot of fillrate.
Say I use the trees as models along with the leaves - is there any option I have to create an efficient system? I am much concerned about the leaves.
Answer by Graham-Dunnett · Sep 15, 2012 at 10:17 PM
So, the profile stats you upload say that the CPU is constantly waiting for the GPU. You are GPU bound. This means that the GPU is spending huge amounts of time rendering your tree and the CPU is sitting doing nothing a lot of the time. I fully expect that what is taking time is the rendering of the leaves. This may seem surprising to you. However, the iOS GPU (in fact all mobile GPUs) are designed to sort all triangles in depth order before rendering. What they are trying to do is eliminate all triangles that cannot be seen. For something like leaves on a tree, where you have large numbers of triangles all at different orientations, and overlapping in strange ways, this sorting can take a lot of time. Each leaf potentially is sorted against every other leaf. (Caveat - I do not have the data to confirm that this is your problem, however, it is what I expect your problem is.) If this is your problem, then I think it falls into the category of your game design not being suited to the technical limitations of the hardware. It's because we have all grown up with PC GPUs that render everything you throw at them that this seems surprising. PC GPUs do not have to worry about limited battery life.