Viewshed/Sensor doesn't sense entities?

1. A concise explanation of the problem you’re experiencing.

Hi, i tried to build a polygon structure using cesium polygon entity and projected a sensor on that.

But i have observed that viewshed isn’t sensing that there is a obstruction, while it senses other 3D Tiles beside it.

The Cesium version you’re using, your operating system and browser.

Cesium version 1.55, Chrome 75

Can you show a screenshot or video of the issue? Do you have a code example you can share so I can reproduce the issue?

Hi Omar,

Thanks for replying, here posting a snap for your reference.

Viewshed on entities.png

Can you show the code that constructs this sensor and the entities? Is it just the topmost box that is not being detected? What happens if you move it? (Either move the sensor or the box).

Hi Omar,

Here attaching a snip, which contains 3D Tile and a block (build using cesium entity). so, here when i tried to project sensor on to the 3D Tile and Block(Entity : In Orange color) shows that sensor is sensing the 3D Tile resulting in the obstruction(red area) formed, where it is not sensing the Block(in orange color).





Can you provide the code you used to create this?

Hi Omar,

Below is the code used to create sensor,

var rectangularSensor = {};

rectangularSensor.radius = r;

rectangularSensor.xHalfAngle = Cesium.Math.toRadians(25.0); //vertical:2x

rectangularSensor.yHalfAngle = Cesium.Math.toRadians(30.0);

rectangularSensor.portionToDisplay = portion;

rectangularSensor.lateralSurfaceMaterial = new Cesium.GridMaterialProperty();

rectangularSensor.lateralSurfaceMaterial.color = new Cesium.Color(0.0, 1.0, 0.0, 0.8);

rectangularSensor.lateralSurfaceMaterial.cellAlpha = 1.0;

rectangularSensor.lateralSurfaceMaterial.lineCount = {

x: 10,

y: 5


rectangularSensor.showLateralSurfaces = showLateralSurfaces;

rectangularSensor.ellipsoidHorizonSurfaceMaterial = new Cesium.GridMaterialProperty();

rectangularSensor.ellipsoidHorizonSurfaceMaterial.color = new Cesium.Color(0.6, 0.6, 0.6, 0.5);

rectangularSensor.ellipsoidHorizonSurfaceMaterial.cellAlpha = 0.5;

rectangularSensor.ellipsoidHorizonSurfaceMaterial.lineCount = {

x: 12,

y: 10


rectangularSensor.showEllipsoidHorizonSurfaces = showEllipsoidHorizonSurfaces;

rectangularSensor.domeSurfaceMaterial = new Cesium.GridMaterialProperty();

rectangularSensor.domeSurfaceMaterial.color = new Cesium.Color(1.0, 1.0, 0.0, 0.3);

rectangularSensor.domeSurfaceMaterial.cellAlpha = 0.5;

rectangularSensor.domeSurfaceMaterial.lineCount = {

x: 5,

y: 7


rectangularSensor.showDomeSurfaces = showDomeSurfaces;

rectangularSensor.ellipsoidSurfaceMaterial = new Cesium.Color(1.0, 0.0, 1.0, 0.5);

rectangularSensor.showEllipsoidSurfaces = showEllipsoidSurfaces;

rectangularSensor.environmentConstraint = true;

rectangularSensor.showEnvironmentOcclusion = true;

rectangularSensor.environmentOcclusionMaterial = new Cesium.GridMaterialProperty();

rectangularSensor.environmentOcclusionMaterial.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);

rectangularSensor.environmentOcclusionMaterial.cellAlpha = 0.5;

rectangularSensor.environmentOcclusionMaterial.lineCount = {

x: 0,

y: 0


rectangularSensor.showEnvironmentIntersection = false;

rectangularSensor.environmentIntersectionWidth = 10.0;

rectangularSensor.environmentIntersectionColor = new Cesium.Color(1.0, 0.0, 1.0, 0.3);


Any reply on this?

I think I may have replied to this over support email, but just to close the loop, the sensors will currently detect 3d models and 3d tiles, but not geometry created for entities. For now the workaround is to add what you’re trying to test against as a 3D model. For support with the analytics SDK you can always reach out to support@cesium,com.