I am trying to add normals for a quantized mesh terrain server but I cannot find exact instructions on how these normals are supposed to be calculated.
First I tried to simply calculate them using the neighbouring faces:
It seemed to be be correct but the shadows in Cesium were strange.
So I compared some tiles and figured that I probably have to include the tiles position in EECF into the normal calculation as the 0/0/0-tile from Cesiums Terrain Server looks like:
I then ended up calculating a vector from the earth center to each vertex in my mesh.
Using only this as normal looks quite similar for my 0/0/0-tile but this way no local vertex normal information is being included:
I thought I would have to add both the EECF vector and the normal vector up but this again leads to shadows which do not seem to be accurate:
Any thoughts on combining these or am I completely mistaken in the calculation procedure?
Thanks a lot.