Floating origin
Floating origin is a 3D rendering technique used primarily in video game graphics, where the virtual camera is used as a coordinate origin instead of it being a predefined point usually located in the center of the virtual scene. Instead of moving the camera to change the shot, the entire scene is shifted while the camera always stays at the origin. An alternative method called origin shift snaps the world and camera to the coordinate origin after moving the camera a specific distance away from the origin. These methods are typically used in 3D video games with large or procedurally infinite worlds to avoid rendering glitches caused by precision loss in floating-point arithmetic when moving the camera or player far away from the origin.
Reasoning
[edit]The vast majority of 3D games use floating points to represent coordinates, which has the advantage of accurately representing the world near its origin; however, the precision halves for every power of two units away from the origin.[1] With the single-precision floating-point format (32-bit IEEE 754), the precision becomes inaccurate enough to not calculate fractions after 8,388,608 units. As precision gets lower further away, integer coordinates are skipped unless they are divisible by a power of two, with this power and the number of integers skipped increasing as precision continues halving until the coordinates eventually round up to infinity after 170 undecillion () units away from the coordinate origin.[2][3][4]
Video games using the traditional method of having the world center as the origin suffer from graphical, physics and terrain glitches at long distances that become progressively more severe the further the player gets away.[5][6][7] The most common artifact is a graphical spacial jitter caused by vertices in polygon meshes snapping to the nearest available coordinate.[1] Using more precise formats, such as the double-precision floating-point format, helps postpone the distance effects to further coordinates, but at a computational cost. The floating origin method allows travelling greater distances without precision errors, since coordinate precision will be lost the further the object is from the camera instead of an arbitrary point in the world. The method also allows using less precise but more performant formats, such as the half-precision floating-point format that would otherwise be unreasonable.[4]
Technique
[edit]A common implementation of the floating origin method involves geometric transformation of the world around the stationary camera such that it appears the camera itself is moving and rotating.[2] This approach is believed to be pioneered by Christopher G. Thorne in 2005.[1][6] If needed, a higher precision floating-point format may be used to represent the absolute position of objects.[8] Alternatively, the world and camera may be snapped to origin after reaching a specific distance threshold. Depending on the implementation, this approach can be more performant.[3][7][9] This technique is often called origin shift.[4][10][11]
Due to most multiplayer games having multiple cameras focused on each player, the floating origin technique may not be compatible without focusing the origin on one player, making the other players suffer the distance effects, or using client-side coordinate calculation, which is usually limited to graphical calculations only.[8]
See also
[edit]References
[edit]- ^ a b c Thorne, Chris G. (2005). Using a Floating Origin to Improve Fidelity and Performance of Large, Distributed Virtual Worlds.
- ^ a b Francis, Bryant (2025-10-20). "DayZ creator says frameworks are the future of game dev". Game Developer. Retrieved 2025-12-02.
- ^ a b "Floating Origin". Google Developers. 2022-03-21. Archived from the original on 2022-03-22. Retrieved 2025-12-06.
- ^ a b c "Origin Shifting". Visual Design Cafe. Retrieved 2025-12-19.
- ^ Bailey, Dustin (2024-04-19). "After 13 years, Minecraft's most legendary journey to the Far Lands has just passed the final milestone before the end". GamesRadar+. Retrieved 2025-12-05.
As you progress further from the start location, the game's old floating point precision errors [...] cause movement to appear increasingly jittery at certain distance thresholds.
- ^ a b "Floating Origin (Huge Scenes Support)". doc.babylonjs.com. Retrieved 2025-12-05.
- ^ a b https://elib.sfu-kras.ru/bitstream/handle/2311/137257/sviridovfinal_1.pdf#page=24
- ^ a b "Floating Origin". docs.coherence.io. Archived from the original on 2025-10-07. Retrieved 2025-12-05.
- ^ "Working with large distances (Floating Origin) -". netherlands3d.eu. Retrieved 2025-12-05.
- ^ "Floating Origin in Unity". Manu's Techblog. 2022-04-06. Retrieved 2025-12-05.
- ^ "World Origin Shifting". docs.coherence.io. Archived from the original on 2025-08-10. Retrieved 2025-12-19.