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?

235 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

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).

You are viewing 1 out of 7 answers, click here to view all answers.