Does Unity have a map size limit and if there is what is the limit? Is there a way to work around it? I am making a open world zombie survival world and I want to make a really big map. Thanks!
3 Answers
The limit for a single map is 2000, you can merge them until your pc allows you. I have copied a fully painted terrain around 4048~ times and everything was working properly. The rendering view ends at 2km. The terrains area does't affect performance, the LOD does, grass etc.
Somebody has actually made a map which was the size of Alaska, was funny to watch videos of people who tried running across the map. The only problem in creating a persistant world is the fact that when there are two terrains next to each other. They can not be edited at once, this creates many places for the holes in the ground where players could fall. In order to avoid this, you'd need to get a seamless terain plugin that allows you to merge terrains so that their lelevation level is the same.
To work around the limit you should use 4 terrains that are 2km/2km instead of a 4km/4km.
Search the terrain plugin directory on the unity asset store.
FYI. Don't make the world too big. A standard game human character will need over 10 minutes of running to cross 2 kilometres.
-
\$\begingroup\$ The limit applies to the built in unity terrain* \$\endgroup\$ Commented Jun 14, 2013 at 2:58
-
\$\begingroup\$ Yes, I guess it depends on whether they want the terrain or SCENE limit... \$\endgroup\$ Commented Jun 14, 2013 at 2:58
-
-
\$\begingroup\$ So would I be able to make a map the size of Florida? \$\endgroup\$ Commented Jun 14, 2013 at 3:11
-
1\$\begingroup\$ You may run into floating-point issues with such large sizes \$\endgroup\$– JeffCommented Jun 14, 2013 at 14:43
For such a big map, specially if you're planning on some kind of vehicles, take into account floating point errors.
What I mean is, if you get too away from x:0,y:0,z:0, the floating point errors will be enough to make physics shake, and many other bad things. This can be fixed by simply moving the entire world. Basically moving the whole map, making sure your position is at 0,0,0.
A rule of thumb is that for anything bigger than 5km for safety you should do corrections. This is probably way under the "game-killing physics" distance, but it's better to be safe.
According to most of the threads on Unity Answers there is no effective limit. You're limited only by computer accuracy of floating points, memory and the amount of objects you can have. That being said - you should consider cunking your scenes up for the sake of organization. Maintaining one big scene might get really monstrous, really quickly.
-
\$\begingroup\$ You are wrong, the volume of the world isn't doing any change. Player is in a rendering sphere~bubble with sight limited to a 2km radius. The monstrous thingy only applies to the hard drive disc, where the terrain data is stored. Fully coloured map takes up to 10 MB I think. Ofc a standard one with the tile offset etc. and everything set to default. \$\endgroup\$ Commented Jun 14, 2013 at 3:05
-
\$\begingroup\$ I wasn't referring to the visual representation to the player - I meant actually panning and creating a gigantic map... and then you have to maintain it... \$\endgroup\$ Commented Jun 14, 2013 at 3:07
-
\$\begingroup\$ And you tell unity how far do you want to render details, trees. You can't see grass over 250m, it is a bottlecap. \$\endgroup\$ Commented Jun 14, 2013 at 3:07
-
\$\begingroup\$ Ow, consider it minecraft Lego's drawing trees with a brush is an easy thing to maintain :D \$\endgroup\$ Commented Jun 14, 2013 at 3:10