Outerra forum

Outerra Engine => Technology => Topic started by: montify on May 10, 2013, 11:05:23 am

Title: handle float precision
Post by: montify on May 10, 2013, 11:05:23 am
Hello.
I love Outerra :)

But my question is: How you handle float precision in the "Terrain System".

You use double instead float?


And do you use Chunked-LOD for the Terrain?

please answer me :)

best regards from your neighbor (Austria) :))
Title: Re: handle float precision
Post by: cameni on May 10, 2013, 02:32:04 pm
No, doubles are slow on GPUs and take unnecessarily more memory. We are using the switching to local coordinate reference systems.
Initially the planet geometry is rendered with 0,0,0 in the planet's center. Once the precision is not enough (from a certain quad-tree level), all sub-tile geometry is referenced from the center of the tile where the switch happens.

Btw there's a good book that talks about the ways that can be used to deal with the precision problems (among other stuff): 3D Engine Design for Virtual Globes (http://www.virtualglobebook.com/)
Some info & code about it is also here: http://blog.virtualglobebook.com/2010/11/vertex-transform-precision.html (http://blog.virtualglobebook.com/2010/11/vertex-transform-precision.html)

Yes we are using a system similar to the Chunked LOD, though we didn't know it was named so when we created it :)
Title: Re: handle float precision
Post by: montify on May 10, 2013, 02:35:04 pm
Thank your for reply.

And many thanks for the Links! :)

here is my try:

Planetary Renderer with ChunkedLOD (http://www.youtube.com/watch?v=yuZ_nFmQOgs#ws)

very basic and 0,0001% done :D
Title: Re: handle float precision
Post by: cameni on May 10, 2013, 02:42:45 pm
Everybody has to start somewhere :)
Good luck!
Title: Re: handle float precision
Post by: montify on May 10, 2013, 02:53:14 pm
Thank you!

Outerra is my motivation to work every day hard on it :)
Title: Re: handle float precision
Post by: montify on May 10, 2013, 03:49:16 pm
Here you see the float precision...NOT

The white dot's

(https://dl.dropboxusercontent.com/u/19373509/f/xxxA.png)
Title: Re: handle float precision
Post by: PytonPago on May 10, 2013, 04:48:41 pm
Looks nice tho ...  ;)
Title: Re: handle float precision
Post by: Edding3000 on May 11, 2013, 12:44:56 pm
Seems a stitching problem, not FP precision.
Title: Re: handle float precision
Post by: montify on May 11, 2013, 01:14:36 pm
In this Screenshot stitching is not implemented, but i implemented now and seems like in the screenshot.


Here you se without Normals a closer look to the border of 2 Chunks ( same LOD level)
(https://dl.dropboxusercontent.com/u/19373509/ac/aa2.png)

Think the inaccuracy are from the PerlinNoise Heightmap... hm