Sorry for multiple (deleted) posts. Had problems with images in the post not appearing…
In May of 2017 I posted on the forum related to a problem with a parallax effect I was experiencing with a couple of different objects. Here’s a link to that topic:
https://groups.google.com/forum/#!topic/cesium-dev/4QsA6LPNMqo
At that time I was able to resolve the issue with both the ellipsoid and wall entity objects by providing surface elevation data through callback properties. However, last week I noticed that the wall entities are displaying the same parallax effect as before. I have not changed the code drawing these entities, so I’m not sure what the problem is.
The code used to add these WallGraphics entities looks like this:
var newCurtainSeg = cesiumViewer.entities.add({
id: this.TrackId,
wall: {
positions: new Cesium.CallbackProperty(this.updateCurtainPositions(this), false),
minimumHeights: new Cesium.CallbackProperty(this.updateCurtainMinimumHeights(this), false),
material: new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(this.updateCurtainColor(this), false))
}
});
``
I attempted to revert to older versions of Cesium to see if I could establish when this problem resurfaced, but that’s not as easy as I thought it would be. With the recent changes to Cesium ion related to a user tokens, elevation data and imagery I’m having a difficult time implementing old versions of Cesium.
A specific question I have about WallGraphics… The “minimumHeights” property is defined as “A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface.” This makes is sound like the globe surface will be used to define the bottom of the wall if the minimumHeights array is not provided. But this does not seem to be true. If I do not provide minimumHeights data I get a pretty significant parallax effect when I tilt the globe. In order for this parallax effect to occur it seems that the bottom of the walls must be defined somewhere below the surface of the globe. Should the bottom of a WallGraphics follow the globe surface if no minimumHeights data is provided?
Below are several screen captures showing the parallax effect I’m seeing. This flight has been paused, and the screen captures show the bottom of the WallGraphics appearing to move across the surface of the globe based on the direction the globe is tilted. Looking straight down from above the wall is lined up on the runway. But tilting either direction makes the wall appear to be shifted significantly toward the eye position.
I’ve experimented with providing various values for the array of heights for the bottom of the wall. If heights match the ground elevation the parallax effect is almost eliminated. But since I have numerous aircraft visible at any give time and the walls are following the aircraft the performance takes a big hit if I try to use sampleTerrainMostDetailed to continuously update the minimumHeight values. And hard-coding values that “should” always be under ground still results in significant parallax effect.
Any ideas on an efficient way to draw these walls and prevent the parallax effect?
I’m using Cesium 1.50 and Chrome Version 69.0.3497.100 (Official Build) (64-bit) on a Windows 10 laptop.
Thanks,
Ro