Hi!
1. A concise explanation of the problem you’re experiencing.
I’m visualizing 3D point clouds with Cesium and would like to visualize a height gradient (something like this: https://user-images.githubusercontent.com/3269617/33374948-e5173068-d510-11e7-9ef5-2df7b4833f74.png).
I am trying to accomplish this using 3D Tiles styles based on the POSITION_ABSOLUTE attribute.
When tinkering around with approximations for the point-to-ellipsoid distance problem, I noticed that there are visible artifacts in the gradient I’m getting.
This makes we wonder: What is the precision of the POSITION_ABSOLUTE attribute of a point? It seems like the precision used in styling is much lower than the precision used for placing the point. Or am I missing something else entirely?
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
See here for an example based on the “3D Tiles Point Cloud” sandcastle example.
In this example, I color points based on the fractional part of the z-axis component of the POSITION_ABSOLUTE attribute. What I would expect is a rather smooth greyscale gradient along some tilted axis (as the z-axis is not ‘up’). The visualization however shows basically two colors: Black and grey. This tells me that all points have a precision of not even one fractional digit?!
This is the same for the x-axis component. For some reason, the y-axis component seems to provide better results in the example.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
If there is a better way to visualize a height gradient of the point cloud, I’m interested. However, I’d rather avoid pre-calculating (and storing!) that attribute for every point for all data sets that we have.
4. The Cesium version you’re using, your operating system and browser.
Sandcastle currently uses Cesium 1.62, I’m using Arch Linux and Firefox 69. I also reproduced the problem on a Windows 10 machine with Chrome.