Top Qs
Timeline
Chat
Perspective

Floating origin

3D rendering technique From Wikipedia, the free encyclopedia

Remove ads

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.

Remove ads

Reasoning

Summarize
Perspective

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]

Remove ads

Technique

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]

Remove ads

See also

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads