- Home /
big terrain performance && mobile
Hi guys I want to make an open world game.. So I need to do a very huge map! I know that if a make a big terrain, Unity loads it all killing my RAM :D Is splitting terrain in smaller terrains a good solution to solve the problem? How can i do it simply? Are there other methods to increase performance using a very very very very huge terrain?
Another thing.. I'm doing this game for Android/IOS.. Do you suggest me to buy terrain4mobile or something similar to do my map? Now I'm using the default terrain object and it works great.. Does t4m increase a lot the performance?
thanks :)
If you turn on render Stats, what's your Tris/Verts as you move around?
In the big city (the most populated zone of the map): 135k verts and 90k tris but the game is designed for tablet and powerful phones infact it runs so good
but i'm working on a piece of terrain.. i have not done all the map
You could use terrain-combiners from the asset-store, and the only when your player is blank distance from the terrain it loads it in. And if you want horizons, maybe use billboarding, also alter, trees, grass, and other terrain properties to improve performance. Hope this helps :) Also what is the name of your game and is it co$$anonymous$$g to iOS, I really would like a openworld iOS game!
thanks for the answer :) i don't know yet the name I will choose ahah :D anyway i write down your name and i'll contact you when i will publish it ^_^
I forgot to say maybe not billboards for vistas, more like, planes, kindof like a skybox, but they need to be planes to disable and enable.
Answer by shifty · Jan 17, 2014 at 04:56 AM
Use multiple terrains it has the advantage of disabling terrains that are not in the cameras view. Even a simple script that disables terrains that are a certain distance away.
public GameObject TerrainRef;
void Start () {
InvokeRepeating("Methodname",2,2);
}
void Methodname () {
//write a simple distance method
}
If you want me to write you a proper script just let me know(little busy atm). USE MULTIPLE!
oh thanks! if you want and you have time, i would appreciate a proper script :D
Take the size of your terrain and if you are too far (using Vector3.Distance) from it then disable the terrain. That is the simple way.