## Re: [Algorithms] Huge world, little precision

 Re: [Algorithms] Huge world, little precision From: Gino van den Bergen - 2007-02-28 15:52:38 ```When you are using fixed-point position for vertices and view pos, you'd better not do a full world to view space transformation because then you'd have to perform rotations on fixed-point coordinates. There basically is not a nice way to do this even on a CPU. Rotations are best done using float values.=20 However, you can compute all your vertex positions relative to the view pos in world coordinates before converting them to float vectors. Distant vertices will drain your relative float accuracy but that does not matter so much since they will be rendered on a much coarser detail and the inaccuracy will disappear in the projection.=20 You could use int64_t for world coordinates, or use a hybrid approach in which you store the integer part of a coordinate in an int32_t and the fractional part in a float. The hybrid approach is nice if you want your viewer to move at a finer granularity then your world grid. The only operation that is performed on world coordinates is subtraction after which the value is converted to a float and handed over to your rendering code. Having view-space-relative world coordinates will probably also come in handy for doing your LOD-ding. Gino van den Bergen http://www.dtecta.com BTW, you guys are from Eindhoven? If you like you could drop by here in Breda and discuss this topic further. =20 > -----Original Message----- > From: gdalgorithms-list-bounces@... > [mailto:gdalgorithms-list-bounces@...] On Behalf Of > George van Venrooij > Sent: woensdag 28 februari 2007 13:40 > To: Game Development Algorithms > Subject: Re: [Algorithms] Huge world, little precision >=20 > Thanks for the link to the article, it is indeed very true :-) >=20 > I understand the possible solutions to maintain precision in the dataset. > But the biggest problem I am running into, is how to "mold" that data for > the GPU when rendering. Obviously the GPU cannot render fixed-point > vertices, so they need to be processed before sending them. And when > sending > them they should preferrably be in view-space. >=20 > My goal is to keep that processing down to a minimum, but the nature of > the > data causes a problem: >=20 > The problem with a ROAM-like algorithm is that the mesh can (and usually > will) change every frame. And the viewer's position will change as well. > The > only viable solutions I see for this are: >=20 > 1. Translate the generated vertices to view-space before rendering every > frame (expensive for large meshes) > 2. Generate the planet in "patches" that have their own local coordinate > system, and render each "patch" separately. This is also something that > Jim > Schuler suggested (this probably requires doubled vertices or triangles on > the "seams" of the patches and hope they fit together nicely when > rendered) >=20 > I'm wondering if there is some kind of third option... >=20 > Regards, >=20 > George > george@... > http://www.organicvectory.com >=20 >=20 > ----- Original Message ----- > From: "Conor Stokes" > To: "Game Development Algorithms" list@...> > Sent: Wednesday, February 28, 2007 13:12 > Subject: Re: [Algorithms] Huge world, little precision >=20 >=20 > > There are also lots of neat bit tricks you can do with fixed point > integer > > coordinates at an object level for building acceleration structures. > > > > ----- Original Message ---- > > From: "logout@..." > > To: Game Development Algorithms list@...> > > Sent: Wednesday, February 28, 2007 8:23:32 PM > > Subject: Re: [Algorithms] Huge world, little precision > > > > 64 bit integers? > > > > Anyway, I believe you should read TomF's blog, as it dealt with this > > subject: > > > > > http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BA%20matter%20o f% > 20precision%5D%5D > > > > Regards, > > > > -- Emmanuel Deloget > > > > ------------------------------------------------------------------------ > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDAlgorithms-list@... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 > > > > > > > > > > > > > > > ________________________________________________________________________ __ > __________ > > Now that's room service! Choose from over 150,000 hotels > > in 45,000 destinations on Yahoo! Travel to find your fit. > > http://farechase.yahoo.com/promo-generic-14795097 > > > > ------------------------------------------------------------------------ > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDAlgorithms-list@... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 >=20 >=20 > ------------------------------------------------------------------------ - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V > _______________________________________________ > GDAlgorithms-list mailing list > GDAlgorithms-list@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 ```