Double precision support in UE4
Does UE4 support double precision calculations? I'm currently evaluating potential graphics engines to use in a fully realistic solar system and space flight visualization/simulation program, and one of the necessary features for our project is full double precision support so that we can keep our calculations precise even at very large distances. Is this something that UE4 supports or that could be implemented without too much difficulty? Also, I've read about world size limits in UE3. Are there still limits on world size in UE4? Thanks!
Enabling double's everywhere would be an extremely difficult task. Additionally GPUs don't have universal support for them, so even if all your CPU work was in doubles, at some point everything would need to return to floats to head to the GPU.
Your best bet is to do the high precision simulation in your own code in doubles (or larger) representations. Then treat each loaded region of space as a zone where the float is still a passable representation of distance. In those regions you'd divide out the cell coordinate from the high precision double calculations to transform it into the space of some particular region. It's essentially the same concept as a spatial hash.
So if my zones are lets say 100000 units across, and the actual user location is 362000.4323452343 (along one axis), I would % modulo by the cell size and be left with 62000.4323452343, and you'd do that for each axis for a players position to arrive at their local space location.
Streamable levels would most likely correspond to your zone size.
answered Jun 16 '14 at 01:00 PM
Nick Darnell ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here