Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How big can i make my world?

Discussion in 'Editor & General Support' started by jroto23, Oct 26, 2016.

  1. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    I don't want it endless. i want to make a single large terrain world. i know it is a hard question to answer since you do not know how many objects or characters i will place in the game. so let's assume i will use a medium density. by medium density i won't have lush grass or thick forests. the trees i will use will be quality. please give me an estimate using unity units. THANKS!
    I forgot to add it will be multi player using unity online services and a maximum of 16 players
     
    AntonioModer likes this.
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    It's almost impossible to say, as needs differ by the type of game, etc. For example, a Flight Simulator could be significantly larger world than an RPG because the amount of detail is less. In addition, your target platform and specs will matter. If you're making a game for an iPhone, then of course it would have to be significantly smaller than a PC game when targeting a machine with 16GB of RAM.

    But let's say you're going for a "skyrim" style world for PC. Completely "pulled out of the nether regions" guess, Without doing anything special, you could probably make it a 4 square KM (1 meter units, 2048x2048 terrain). Standard LOD on models, etc. Of course you could go significantly higher if you add in some streaming capability (like WorldStreamer https://www.assetstore.unity3d.com/en/#!/content/36486 , or you write your own simple one with the SceneManager).
     
    AntonioModer and DroidifyDevs like this.
  3. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Pretty damn big. You don't want to scale things too small as you'll run into physics issues, but your scales shouldn't be going into the tens of thousands either. It all depends on how complex your game is. More terrain = More RAM and overhead, so it depends on what platform you're targeting (Windows, Android etc...) and what you're making. However, if you're going to generate your own terrain mesh (not using Unity's built-in system), it could probably even get higher.

    With enough optimization, almost anything is possible, and what you're trying to achieve has probably been done in Unity before. You're going to have to be smart with your terrain resolution and shaders, but it is quite possible.

    I can't give an exact number, however @Jaimi has said 2048 X 2048, which seems about right. I could argue that you could get higher, however you have to remember that some people have only 4GB of RAM. Again, it depends on how much you put on there.

    I'd recommend experimentation with mass placement of grass and trees before actually making the game. If you're on a PC, you could even pull a RAM stick (assuming you have a couple) to try it with less RAM.
     
  4. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    Are you saying make it 2048x2048? or 4 times that using 4 separate 2048x2048 tiles?
     
  5. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    I think he meant use 1 2048X2048, which is about 4 square KM. Remember that 1 unit = 1 meter, so 2,048 meters * 2,048 meters = 4,194,304 meters squared, which is 4.194 KM squared ( 4KM long and 4KM wide).
     
    jroto23 likes this.
  6. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    Thanks Droid
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Yes - sorry, that's what I meant. To me, this size is quite large. It's not Skyrim large (that would require streaming), but it's enough for 16 people running around.
     
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    10,000 unity-units maximum world size is fine if you're using the default scales of 1 unit = 1 meter. This is a technical limit, beyond this, physics start messing up due to lack of precision.
     
    eaque likes this.
  9. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    90
    The game I am writing has an area of about 10 square kilometers.
    Most of which is sea, and its scaled up by about 4x, so 8 units is about 2meters.
    Works just fine. I wouldn't go larger. than that. Overall a complete zoom out there is still alot of space, and it probably takes up about 30% of whats possible to the max 10k units.
     
  10. garmadonbees

    garmadonbees

    Joined:
    Jun 22, 2019
    Posts:
    2
    hey guys what you where mentioning is pretty informal i just have some questions that i hope you would be able to answer me thank you :
    firstly how much ram would it take having a 10k by 10k platform and a decent resolution for a 3d mmorpg .
    second is it possible to create a planet and have players roam on it surface that way creating the illusion of infinite ground yet having it loop back to where it all started (0,0,0) /
    3rdly i would also appreciate it if u told me more about the streaming thing you talked about earlier .
    i know its a lot of questions but i hope i would be able to get some answers regarding these topics thanks again .
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Use MapMagic to generate your stuff on the fly if you're going for something large. Or a streaming solution like world streamer. Or write your own loading in and out scenes. But I suggest MapMagic.
     
    GodToRun likes this.
  12. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I have a realistic sized spherical planet, defined mathematically and generating mesh near the camera. My player is inside a spaceship, so there are small scale d tails like buttons and switches which are 1cm in size. Even travelling a few kilometers from the origin shows jitter on the buttons due to the limit of precision using floating point numbers. I use a floating origin system so when the player gets 2km from the origin, everything moves by 2km so the player arrives back at the origin. It doesn't matter if stuff 2km away from the player jitters by a centimeter or so.

    Using this technique I don't see any practical limit on the size of the game world. To push the upper boundary I did a test with realistic sized and placed moons of jupiter. If just using true coordinates and a floating origin system here, the player when on the surface of a moon will be travelling some kilometers per second, which the physics engine wasn't too happy with. But you can cheat and just make the moon mesh stationary and move everything else around the player instead.
     
    garmadonbees likes this.
  13. garmadonbees

    garmadonbees

    Joined:
    Jun 22, 2019
    Posts:
    2
    wow thats honestly really awesome im gonna have to look into it further but thanks for the helpful info :)
     
  14. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    No worries, happy to help if you have any questions. This might not be the best way to go about things if you need to walk around on the surface though. Moving the colliders in the floating origin system is expensive. I have the luxury of disabling the ground colliders totally once the player spaceship gets some altitude.
     
  15. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    735
    sorry, old post but i would like to understand one thing. 10 000 unit is some kind a limit, ok. But How to you count it.

    I mean from 0, 10 000 or -5000; 5000
    If i have a 10km terrain, if it is centered, it will be -5000 5000 on x axis let's say, so far from 10 000? Do you agree?
     
    hippocoder likes this.
  16. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    10,000 isn't really a limit. What you're dealing with is floating point inaccuracy. World space positions in Unity are done using Vector3's, and those are really just 3 float types for x, y, z positions. Floats have an accuracy of around 6-7 decimal places. So when you get around 10,000 from origin, Unity starts being unable to do very accurate positioning at small scales, because those small scales far from origin may exceed the accuracy of the float type.

    That only is a problem if you need that small scale accuracy though. The main game I'm working on the player can go over 100,000 from origin without issue and with working physics, because there's nothing at small enough scales to notice the problem.

    But on your specific question, it isn't about how far across, it is about how far from origin (how far from 0,0,0). If you need a larger world and need small scale stuff to work, look into "floating origin" where you periodically move everything in the game world so the player is back around 0,0,0.
     
    eaque likes this.
  17. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    735
    thx
    i would be happy to get some examples of small scale usage. What about a third person controller?

    My main objective is too reach that limit (even stay lower) to avoy using a floating point solution. I don't need big, but i want to go as far as i can ...If you get what i mean

    i want an openworld but i don't want it Huge
     
  18. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Small as in small in size. If you have animations of hands, walking, etc, at 1 unit = 1 meter scales, you're dealing with some small stuff that needs good accuracy of movement or you'll see jitter.

    When I mentioned in a game I'm making the player can go 100k from origin without issue, it is because it is a game where the player is the captain of a large sailing ship with no small animations, no human models, etc. If the ship is off by 0.1 units from where it should be you don't even notice - but a hand's position off by 0.1 units would look game breaking.
     
    eaque likes this.
  19. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    As an example of small scale usage, I am working on a space game where you sit inside the cockpit. I have buttons and controls on front of the camera, which are sized in centimeters in the real world. If I take this cockpit with the camera in it, and move it in the unity scene (1 unit = 1 meter), I can move it only a couple of kilometers from the origin before I can start to see problems. The scene coordinates for the controls start to become a big number (say >5000) and lose small precision (milimeters), so they begin to jitter and vibrate. As they are right in front of the camera this is very obvious. The further the ship travels from the origin, the worse this gets. It's really only hidden up to a few kilometers, after that the inaccuracy is bigger than the size of pixels and they start to jitter.

    My scene contains an asteroid which is 1000km in diameter, and I want to be able to orbit it, so obviously something needs to be done about this. The solution is to use a floating origin system. Every time my ship gets 100m (100 unity units) away from the origin, I move the ship back to the origin and move the asteroid by that same amount.
    This means that the controls and camera and ship never run into accuracy problems. On the actual asteroid surface, there are of course inaccuracy problems, and on the far side of the asteroid things must be jumping around by meters or tens of meters, but these are so far away from the camera, that they dont have any visual impact, as that jitter is still less than the size of a pixel on the camera screen.

    Working with scenes of this size you are going to run into floating point problems a lot. I have UV coordinates which jitter, I've noticed physics things going weird sometimes, it crops up in lots of unexpected areas.
     
    cosmochristo and eaque like this.
  20. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    735
    thank you both for your precise answers! :)
     
  21. cosmochristo

    cosmochristo

    Joined:
    Sep 24, 2018
    Posts:
    230
    I am interested in the UV jittering. I try to get a measure of all the different forms of jitter that occur and work out solutions. Based on my metrics at a threshold of 100, compared to a threshold of 0 (i.e. continuous floating origin) you will get 64 times the error error x the magnification from error propagation in calculations (mainly from multiplication)).
     
  22. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    61
    i tested world: camera render (HDRP) get big jitter on smal object (1 cm) on 10000 units, jitter start on 2000 units and increases.
    In editor, on 10000 units, gismo and all renders also jitter, and bad editable, render step is 1 cm, not realistic.
    So, biggest realistic world is max 5000x5000 units(meters) (16 bit mesh), where player can move with first person camera, best result max 2000x2000.
     
    Last edited: Oct 31, 2022
  23. cosmochristo

    cosmochristo

    Joined:
    Sep 24, 2018
    Posts:
    230
    Wow, this thread spans a long time! Thanks @AntonioModer for the HDRP jitter measurements.

    Thanks @AntonioModer for the HDRP jitter measurements. I have covered a lot of metrics like this but they are spread across many documents. One day I will start putting them all in one place.

    I suppose it is not too surprising such threads keep going since large scale issues are widespread and there is still a lack of general solutions.

    “In editor, on 10000 units, gismo and all renders also jitter, and bad editable, render step is 1 cm, not realistic”

    I think you are talking about the Scene Panel view, and yes, it is no good for large scale. I use a number of methods to view/edit/debug Solar System scale worlds. For example, run-time view/debugging in Game/Scene/Hierarchy panels is possible: see bookmark: “Easy large World view/debug” in


    I don't use HDRP as it is not needed for scale/fidelity when applying real floating origin methods.

    In the video, I travel 8million+ meters and that is not the limit, there really is no size limit to full scale worlds. It all depends on the design and algorithms used.