Why in 3D software (like games or 3D modeling apps) if you get too far away from the center point (0, 0 ,0) things get really glitchy and broken?

233 views

Why in 3D software (like games or 3D modeling apps) if you get too far away from the center point (0, 0 ,0) things get really glitchy and broken?

In: 59

7 Answers

Anonymous 0 Comments

A game or software file can only hold so much information. Even if its randomly generated like minecraft and not preloaded, overtime theres so much information, whether it be physical aspects of a game or code that moves you away from the center in the first place, every unit youve made it away from the center adds up and it gets overwhelmed and cant proscess and generate the new information

Metaphorically speaking the more miles you walk outwards the more miles the computer has to process, and eventually it gets overloaded with too many

Anonymous 0 Comments

Coordinates are often stored as floating-point numbers which is essentially scientific notation with a fixed number of digits. Because the amount of digits is fixed, so too is the precision thus once an overall value becomes significantly large (or small), the smallest difference representable with those digits corresponds to a larger percentage of the value as the offset each digit equates to is scaled by the magnitude of the number. The material result of this is that there is a significant gap between possible coordinates that cannot be represented inducing noticable rounding errors as what should be a continuous coordinate space takes on discrete increments.

Anonymous 0 Comments

This is cause positions for these objects are usually represented with single precision floating point numbers. Which basically means they use 32 bits to represent each axis, and after a certain distance the numbers representing positions become more and more inaccurate.

This is why you can see like models becoming kinda shaky and stuff, cause the vertices of the models start jumping around relative to where they should be.

Usually what games (e.g. space related games) can do is actually just use double precision instead, which is 64 bits representation rather than 32. This allows for good accuracy for insane ranges to the point of like galaxies and beyond. A lot of games out there uses double point precision like Minecraft, Elite Dangerous, No Man’s Sky, etc…

Anonymous 0 Comments

In computer graphics (in particular) you use a particular type of number called a floating point number or float. floats are used because standard binary counting can’t account for decimals you can only have whole numbers i.e. 1,2,3,4…

Floating point numbers were a solution to this problem and they work in a different way. in a double precision floating point number you have 64 bits and different sections of bits are used in different ways. it is crated from scientific notation the which is written as something like 2.568×10^(3) which comes out to 2568 exactly, the power value here only moves the decimal point positive to the right and negative to the left. floating point numbers achieve this in a similar way the first segment of bits bits[0..51] contains the 2.568 part of the number and the exponent bits[52..62] contain the exponent which is the ^(3) and the final bit 63 contains the sign which is weather the number is negative.

The thing you’re describing sounds like floating point uncertainty which happens at very high values if you take my example from before 2.568×10^(3) and increase the exponent by one 2.568×10^(4) this will come out to 25680 except I don’t actually know what the last number is so its more like 2568? because the last number was never given. So if i give myself a very high exponent like 128 to make 2.568×10^(128) this makes two hundred fifty-six unquadragintillion eight hundred quadragintillion which is a number my browser is convinced doesn’t exist. With this massive number if I lower the lowest order number by one that changes my 8 to a seven that’s a difference of one hundred quadragintillion which is no small number. This effect also happens with computers because they have a finite amount of space do describe the number they contain so the larger the exponent becomes the larger the value between the current one and the next smallest one. So when you are far away from (0,0,0) the increments in space that something can exist become larger. You can see this happen in videos from the farlands in Minecraft where the players movements are not smooth.

The other problem that can occur is called an integer overflow. An integer is the type numbers that I mentioned earlier that cant have decimals. This can also cause issues and as far as I know is the actual cause of the farlands in Minecraft. Integers are relatively simple to understand each number can only be 1 or 0. how much it means is relative to there it is the short way of explaining it is 2^(n) where n is the number of places from the left the bit is at. but the eli5 way that each bit has double the value of the last one (to the left) so the first bit has the value 1 (2^(0)) the next has 2(2^(1)) the next has 4(2^(2)). the largest number i can store in 32 bits is 4,294,967,295 this is just 32 1’s in binary if we add 1 to this what we get 0. Wait what? where did the numbers go? they are all now in my 33rd bit bit if i don’t tell the processor to use a 64 bit number it will think the result is 0 and depending on the bot the software and the hardware this can have different effects like the farlands or [level 256 in pacman](https://www.youtube.com/watch?v=NKKfW8X9uYk&ab_channel=RetroGameMechanicsExplained).

Anonymous 0 Comments

In a computer you only have a certain number of “bits,” to use to store a single number. These bits work just like digits do in normal math, so I’ll use those in this example instead of binary since it’s the same concept.

Imagine we have 4 digits to work with: `0000`. With those 4 digits, we can store any number from `0000` to `9999`. We can also put a decimal place anywhere within those 4 digits, so technically we can also go from `.0001` to `9999.`. This proves to be a problem though, since as the number we need to represent gets bigger, we need to move the decimal place further to the right, losing precision.

**Practical example:** We have 2 objects in our game which are `0.100` units away from each-other. Object_1 is at position `0.100` and Object_2 is at position `0.200`. We then want both of these objects to move 1000 units away, so we take `0.100 + 1000 = 1000.1` and `0.200 + 1000 = 1000.2`, except **uh oh,** we’re now using 5 digits when we can only use 4!

This means the digits to the right side have to get cut off, so `1000.1 -> 1000.` and `1000.2 -> 1000.`. **Uh oh** **again!** Now both of our objects are occupying the same position! It’s not hard to see how this can lead to problems in games when you start dealing with large scales.

Anonymous 0 Comments

An actual ELI5 answer:

Take a Katamari ball rolling up objects. When the ball is tiny (I.e. size of a mouse), similarly tiny objects such as paper clips are visible. When the ball is large (I.e. size of a skyscraper) the paper clips become so insignificantly small that the paper clips become nonexistent.

The larger the numbers (aka “floating points”) become, the larger the Katamari ball. In a video game, pretend that the paper clip is the length of each step your character takes and the Katamari’s size is the magnitude of their position. The further the character walks, their steps become so relatively tiny that the game stops adding those steps to your position and the game becomes unplayable.

This video does a great job of breaking it down with images and in-game footage: https://m.youtube.com/watch?v=9hdFG2GcNuA

I would also check out floating point formats and how they are stored in memory. If you are familiar with scientific notation and significant digits, then this is why the the larger the number, the less granular they become: https://en.m.wikipedia.org/wiki/Single-precision_floating-point_format

Anonymous 0 Comments

Writing software is all about compromises you’d like to take. In this case it is probably memory vs quality. All answers about precision are correct but they don’t explain why. In real world you pickup an object and rotate it without any glitches, assuming we are not in matrix of course, because real world has infinitely big precision so atoms do not end up at a wrong position. On the other hand when you rotate an object in computer you have limited precision so each modification causes some losses. While these losses are very small to notice they build up and cause visible issues because we calculate an object’s next position by using its current position. This way you have only one object in memory and it always contains latest state. If you don’t want this glitches then you load the object in its initial state and create a copy of original each time you want to transform it. So you will have two copies of the object, one pristine and one transformed. More memory but higher quality.