Hey I was looking at your game you made (the massive open world one)
And was curious, how did you make it where it’s literally massive without
performance killing the machine?
A few people messaged me and asked me what my secret was to detailed terrain on mobile, so i thought I’d share my experience in general here:
First, i don’t do anything particularly special. I’m more of an artist that a coder, so doing things like optimizing shaders etc is beyond me. My approach is pretty straight forward.
I think having a mobile mindset in general is important to optimization. I come from a flash background where performance over a broad range of computers was important, so as a general rule i ‘think small’ and try to optimize everything i do. Since iPhone 4s i have been able to get 2x2km terrains running with trees and textures.
I make sure each texture is as small as possible without looking too blocky. I use a plugin called Resource Checker:
It’s amazing. I use it to go through every texture and shrink to largest ones. This is important because having too many high resolution textures will fill up RAM fast and crash your app.
is it possible to have some of your experience on how you optimise vegetation/tree/grass what shader you used
I don’t use any special shaders or anything, just regular Unity trees. i do limit the detail density and distance though.
are they like painted object on terrain ?
To place objects and vegetation i use Terrain Composer:
The author is brilliant and the plugin is indispensable. AFAIK it just places the objects for you, and performance is the same as if you painted them on the terrain by hand
do they have lod?
No LOD in my projects but that’s because of time constraints, not desire, When i get some more time i will take a look at that
do you use occlusion ?
This is a must on iPhone. Unfortunately in my experience Occlusion changed in Unity 4.3 and has been buggier (more false positives, slower overall, less stable feeling) but that said it’s still essential.
I limit my tree distance and the max number of mesh trees to about 16 to keep performance high.
Im more interested with the overall look an atmosphere of the Open World Wilderness so im not afraid to lower textures or have resolution, antialiasing etc be set very low . I think this mindset helps.
even a 2000 x 2000 terrain kills my performance, at least on Unity 5 it does
you should be able to run it on IOS. I would look at every little thing to see where you can optimize it. Reduce the detail like above, limit your grass density and distance (this fills up ram fast and causes crashes), reduce the number of trees.
That’s about all I can think of. I wish i could say there is one specific secret, but it’s really more about just running your game, watching it crash, reading the error log (which is mostly cryptic to an artist like me but if you just read them you can often see what it was that crashed your game and start there), and reducing the quality.
Oh yeah, goto your QUALITY settings and experiment with 1/8th textures, turning of anisotropy and anti aliasing etc. Start from a really optimized simple scene and move upwards with detail.
Anyways I hope this helps:) I am a huge fan of terrain based 3d and i’m actually surprised we don’t see more of it. The fact that Unity didn’t fix the terrain tree bug for almost a year makes me think that not many people are using terrain and trees on mobile, otherwise it would have been an outcry and high priority. This isn’t to knock Unity but to say that nature designer in games seem to be a bit in the minority.