Announcement

Collapse
No announcement yet.

Placemark or model disappearing when eye is well above it.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Placemark or model disappearing when eye is well above it.

    I saw something odd when using collada models on web WW and confirmed that I also see it with regular placemarks. Not sure if I am missing something like a visibility distance or something.

    If I create a placemark at an absolute altitude of 10,000m and view directly above it and zoom in. When the eye is around 35k the placemark disappears.

    Is there a reason I cannot see the placemark all the way down to eye level of 10,001 meters?

    I used the CustomPlacemark example and set the altitude to 10,000 to replicate / test it.

    Thanks for any advice.

    -Fred

  • fredarters
    replied
    I tracked this down to the NavigatorState projectWithDepth function. Comments suggest the point is being clipped against the near and far clip planes. If I comment out the return in that check, then I can zoom all the way down to my placemark without it being clipped.

    Honestly, I dont understand this well enough to know how the z value is being calculated. If anyone can suggest a way in settings to prevent this from being clipped or control it via config somewhere... I'd appreciate it.

    Code:
    // Complete the conversion from model coordinates to clip coordinates by dividing by W. The resultant X, Y
    // and Z coordinates are in the range [-1,1].
    x /= w;
    y /= w;
    z /= w;
    // Clip the point against the near and far clip planes.
    if (z < -1 || z > 1) {
      return false;  //  commented out this line to allow placemark to be visible at any altitude.
    }
    I added some snapshots of what I'm seeing in case my description is not clear.
    After disabling clip plane check, is visible a few kilometers over the placemark. Base code... 26k or so above, the placemark is not clipped. Base code... 22k or so above, the placemark is clipped and non longer visible.

    Leave a comment:

Working...
X