Jump to content

[SOLVED] some question about the precison of ObjectMeshDynamic


photo

Recommended Posts

Hello dear all,

 

I have noticed that the Class ObjectMeshDynamic have its Vertex data added and saved as float.

such as ObjectMeshDynamic::addVertex(const vec3 &xyz) So does it means that the ObjectMeshDynamic doesnot support double precision?

 

since my project use Unigine as a render engine for a virtual earth system with a real size of earth, so the radius is about

6400000 meter. When we get to a 20 Level LOD, the Cracks begin to appear between earth tiles. the earth tiles are all ObjectMeshDynamic objects. how about your opions? some suggestions is welcome.

 

strange as it is, the cracks appears only between some tiles, but not between every tiles.

 

 

Here are some screenshots from my project:

 

post-512-0-91944800-1356513316_thumb.jpg

 

post-512-0-23659200-1356513337_thumb.jpg

Link to comment

ObjectMesh vertices only support float or half precision, there is no double precision support. Tile mesh vertices should be defined relative to specific ObjectMesh instance world origin. The world origin itself of each ObjectMesh instance (defined in double precision) should be located e.g. at the center of each specific tile region so tile center-relative vertex coordinates stay within float precision limits (to get rid of your large cracks highest levels). If you define vertex coordinates relative to earth center than you will by far exceed 32-bit float precision limits. BTW your approach to use real world dimensions is bad precision-wise, as 32-bit float have better precision resolution for small numbers. Therefore using cartesian world coordinates normalized by earth radius should be favoured.

 

For getting rid of small cracks between tiles (especially at borders between tiles with different split-levels) standard approach is to add a small skirt around each tile. This will cover cracks without introducing complex inter-tile mesh stiching. See these screenshots for an example of mesh tiles with skirts.

 

Another issue are visible texture seams at tile edges. To get rid of these artifacts you have to use some redundant texture border pixels to ensure proper seamless filtering results at edges.

 

There are tons of articles on these issues avaliable on the internet. Best source of information for your use-case might be rendering virtual globes book. It covers all aspects including precision aspects, texturing, overlay rendering etc.

Link to comment

ulf.schroeter , you are always so helpful, very good suggestions. Thank you very very much.

 

 

BTW, Do you think it will be feasible and meaningful to rewrite the ObjectMesh class to support the double float precision?

Some advice is welcome!

 

Thanks again!

Link to comment
×
×
  • Create New...