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?

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

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