Distance from Origin Precision Issues & Localized Coordinates

Started by
2 comments, last by Krohm 12 years, 7 months ago
Hey guys, this is my first time posting in any of the programming forums as I'm an environment artist by profession.

However, I'm extremely interested in tools development, content creation systems/methodologies, and making environment/level creation more effecient, which is why I hope to start my own project with the intent of utilizing a novel modular approach for creating high level of detail content on a large scale.

The biggest issue I know I'll need to address first is one of scale and handling floating point precision issues with having playable areas of the map at extreme distances from the origin. I imagine this issue is faced all the time with flight simulators so I thought anyone who has insight regarding how flight sims or other massive open-world games approach this problem would be worth seeking advice from. My project isn't a flight sim, though flight from point to point is a feature I'd like to support.

The problem is that I want the scale of what you would expect in a flight sim (say 40x40 miles) while still maintaining reasonable tolerances for character level collision, physics, lighting, etc. I fully expect having to subdivide the map into sections that can be pre-cached and streamed while maintaining surrounding sections as macro LOD's or meta imposters, but I'd like to load sections without having to break line of sight. Basically I don't want to have to force the player through a dog-leg, L-bend, or other contrived transition intended to break LOS for loading purposes. Additionally, even if I only have a small section of the level loaded where the player is currently active while the remaining sections are LOD'd if this section is 18 miles from the origin I still believe I'm going to have problems.

So it seems what I need is a way of localizing the coordinate system to the currently loaded or active section of the level. Does anyone know of any methods in general terms for accomplishing this or for dealing with extremely large open-world environments? For my project I was hoping to mod Cry Engine or Unreal either myself or with the aid of a project partner more versed in programming but I'm not sure if either of these engines would even provide the flexibility I need to accomplish this.

Any ideas or suggestions are greatly appreciated.

Advertisement
There was a similar discussion about this only... like a week ago?
Unfortunately, the search functionality appears to be still broken. I wonder if it will be fixed a day.

Anyway, what was suggested was to periodically "reset" the coordinate system so there's no "extreme distance" from it and everything stays nicely in float's good-precision range.
Of course doing that takes a while.
While graphics don't really scare me - just set a matrix and you're ok - physics libraries seem to not allow that... at least not trivially... at least not in Bullet.
Care must be taken in ensuring everything that works on position differences ([font="'Courier New"]nowPos-prevPos[/font]) keeps working transparently.

When it comes to line of sights, everything boils down to complexity WRT hardware requirements. Nowadays hardware is so powerful that you can probably keep rendering everything for a while before having to resolve to some "far rendering" technique. Loading the data will require streaming or multi-threading, neither is trivial.

I am also interested in knowing more about that.

Previously "Krohm"

Krohm, I guess it's the periodic "resetting" of the coordinate system that I'd be interested in learning more about. Are there currently any engines or good examples where this technique is employed?

I could imagine that there may be camera and geometry jittering or jumping at the point where the coordinates are reset if the precision of the translation isn't exact. Or equally problematic I suspect there might be a performance hit depending on the frequency that this "reset" occurs and the number and complexity of elements that have to be "resetted."

Also, does anyone know of the official terminology that should be used when referring to a localized coordinate system such as the concept described above? I never get the results I would expect when looking for localized coordinates systems in search engines, even within the context of games.

Krohm, I guess it's the periodic "resetting" of the coordinate system that I'd be interested in learning more about. Are there currently any engines or good examples where this technique is employed?
Cannot help you there. If you find some examples, I'd be grateful if you could post them here. I don't think you'll find them however, the amount of design & engineering involved makes this unlikely to be put in public domain.
I recall there's a minecraft-clone engine... with a terribly cryptic name... which is supposed to be open source. But again, I cannot find the exact search keywords to find it (as a side note: I don't give a ____ to this minecraft thing).

I could imagine that there may be camera and geometry jittering or jumping at the point where the coordinates are reset if the precision of the translation isn't exact. Or equally problematic I suspect there might be a performance hit depending on the frequency that this "reset" occurs and the number and complexity of elements that have to be "resetted."
Not really. As each 'cluster' would be generated around its local origin, it would be just a matter of supplying a per-frame MVP matrix, just as in standard rendering when mapping object space --> world space. The main problem I had was with the "complexity" of certain "entities" in terms of correctness rather than performance.
If an entity performs delta computations, you're screwed. The only way to work around this was to provide a callback [font="Courier New"]OriginChanged(deltaVector)[/font] or something. That was not feasible in the design I was using at the time. It still is beyond feasibility as I cannot think of a way to do that with Bullet...

Previously "Krohm"

This topic is closed to new replies.

Advertisement