CesiumGS / 3d-tiles

Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas:
2.14k stars 469 forks source link

Vector data precision question. #391

Closed zero406-CC closed 3 years ago

zero406-CC commented 5 years ago

I'm sorry to bother,but I have a question about 3dtiles vector data(*.vctr),I found the float32 precision is not enouth by using the following test data. the right rendering effects is a smooth arc line,in fact the cesium rendering effects is not like that. In addition I found the zigZag precision is not enough too。Is there any suggestions? Best regards. John. var tuBuffer = [1.7888602042793667, 1.7888602218491425, 1.7888602394189008, 1.7888602569886767, 1.7888602745584525, 1.7888602921282108, 1.7888603096979867, 1.7888603272677623, 1.7888603448375382, 1.7888603624072965, 1.7888603799770724];

    var tvBuffer = [0.44911867002003503,

0.44911862847305678, 0.44911858692608042, 0.44911854537910401, 0.44911850383212581, 0.4491184622851494, 0.44911842073817126, 0.44911837919119485, 0.44911833764421838, 0.4491182960972403, 0.44911825455026388];

    var thBuffer = [2008.0976503798699,

2008.03930909731, 2007.9940567584999, 2007.96180013509, 2007.9424727723599, 2007.93603485229, 2007.94247311154, 2007.9618008141499, 2007.99405777883, 2008.03931046102, 2008.09765208978];

lilleyse commented 3 years ago

Hi @zero406-CC - part of the problem is that the legacy vctr format only stores uint16 quantized values. A new vector format (CC #25) will likely offer at least float32 precision. In the meantime you can try makes your tile sizes smaller.

The results may vary for cartographic values but for float32 cartesian values you can get centimeter precision at roughly 131,071 meters when positions are defined relative to a center point. See https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm.