Re: Question about large worlds and foating point precision.
Adrian Bentley <[email protected]> Tue, 21 Jun 2011 21:31:50 -0700
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
For Infamous (medium-small world 200k cm off origin?) we only had a few minor graphical problems far out. We ended up subtracting camera translation from our object matrices before submitting them to the gpu. There were only a few dozen places to edit and it took one guy a few days (including research). There was one other feedback scenario where we manually split out the translation part M2 in M1 * Inv(M2) for precision, but that's it. It was actually all pretty clean in the end. Cheers, Adrian On Jun 21, 2011, at 8:12 PM, Juan Linietsky <[email protected]> wrote: > Here's a doubt i've been having for a while. When developing games based on large worlds (like Elder Scrolls, GTA, etc), i can imagine that physics and rendering become more jittery the further away the camera moves from the origin (due to floating point precision loss). Is this really a problem? If so, how is this solved? I can imagine that increasing floating point precision to doubles helps a enormously, but i'm not sure if that's enough and if it's worth the extra processing/bandwidth cost. > Transforming the world to local coordinates (so the camera is always at the origin) also seems to me like a solution, but sounds like a lot more work and messy code. > So, how is this solved in most cases? > > cheers! > > Juan > > _______________________________________________ > Sweng-Gamedev mailing list > [email protected] > http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com