Surprise Me!

Spatial Precision And Floating Origin In Unity

2019-08-03 0 1,244 Vimeo

This video demonstrates the impact of jitter in Unity and use of a floating origin to address it. Jitter occurs in 3D software like Unity when rendering objects far from the scene origin. Like most game engines and 3D modelling packages, Unity uses single-precision 32bit floating point numbers to store positions: https://en.wikipedia.org/wiki/Single-precision_floating-point_format For the majority of gaming applications this is fine. However, when representing large geographic areas this becomes problematic. As objects move further from the origin the number of digits to the left of the decimal point in the numbers describing their coordinates get larger. This means that the number of available digits to the right diminishes. For example, assuming 1 game unit in Unity equals a metre, you would need a minimum of two numbers after the decimal point to maintain precision to the nearest centimeter. As precision diminishes the vertices in 3D models are forced to snap to the nearest available point. This causes the jitter. One solution is to use a floating origin that tracks the player and moves the game environment relative to their position, rather than moving the player around the environment. The result is that there is always sufficient positional accuracy near to the player to avoid the appearance of Jitter. This approach can be achieved through script: http://wiki.unity3d.com/index.php?title=Floating_Origin

Buy Now on CodeCanyon