Rectangle and RectanglePrimitive is flashing?

Hi all,

I just updated cesium in my application to the newest version.

Since Extent and ExtentPrimitive are removed, I used Rectangle and RectanglePrimitive instead. However, the rectangles I draw on the globe look weird. It’s like the rectangles are twinkling or flashing. I checked in sandcastle, and all the examples with geometries look the same way. Those geometries worked correctly when I used Extent and ExtentPrimitive.

Not sure if I made myself clear enough, so I attached the screenshots.

Anyone knows how to solve this problem? or anyone has any idea of what may cause the problem?

Thanks,

Steven

I just noticed that the problem only occurs on my mac laptop, it works fine on my windows desktop.

Steven

在 2014年6月22日星期日UTC-7上午1时19分27秒,Steven写道:

Hi Steven,

I believe we just renamed Extent to Rectangle so I wouldn’t expect any rendering changes in that part of the code. Can you provide a minimal test case reproducing the problem?

Thanks,

Patrick

Hi Patrick,

Thanks for the reply.

I think the problem is not necessarily related to my recent cesium version update, because all the examples from sandcastle (http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html&label=Showcases) related to geometry are flashing too (just like the screenshot I attached above) if I view them in my MacBook Pro. When I view them in my windows desktop, there is no problem.

Here is some information about my MacBook Pro,

Processor: 2.5 GHz Intel Core i5

Memory: 4 GB 1600 MHz DDR3

Graphics: Intel HD Graphics 4000 512 MB

OS Version: OS X 10.8.5

Please let me know if you need more information to solve this problem.

Thanks again.

Steven

在 2014年6月23日星期一UTC-7上午4时11分50秒,Patrick Cozzi写道:

Hi all,

I just found this bug only exist in 3D view. In 2D and 2.5D view, there is no problem.

Steven

在 2014年6月23日星期一UTC-7上午11时54分32秒,Steven写道:

Steven,

Do older versions of Cesium have this problem? Have you recently updated the OS? WebGL support for Intel HD is OK but not great.

Patrick

Hi Patrick,

The older versions of Cesium don’t have this problem.

I updated the OS one month ago, do you think there is something to do with the OS?

Thanks,

Steven

在 2014年6月24日星期二UTC-7上午5时46分46秒,Patrick Cozzi写道:

I have an Intel HD 4000 (running under Windows 8.1) and I don’t see any problems; so this could be Mac specific. I’ll double check when I have a chance just to make sure.

Hi Matthew,

Thanks for the reply.

I got a chance to check the sandcastle examples on my colleague’s MacBook Pro, and it is working just fine. I started thinking that this bug could be just my Mac specific.

Would you please let me know for sure if your HD 4000 has this problem or not? This really helps me narrow things down. If you have some idea of what should I look into, please let me know too.

Thanks,

Steven

在 2014年6月24日星期二UTC-7下午1时19分22秒,Matthew Amato写道:

I just tried it and everything seems to work fine. Have you tried the latest versions of both Chrome and Firefox? I’m guessing both will have the problem; which heavily points to a driver issue with your specific Mac OS version.

Hi Matthew,

I tried the latest version of Chrome, Firefox, and Safari, all of them have the problem. I will try to run them on more Macs with different OS versions.

Thanks,

Steven

在 2014年6月25日星期三UTC-7下午7时35分50秒,Matthew Amato写道:

Hello all,

Today I tried to run sandcastle geometry and appearances example on four Mac laptops.

  1. Mac with AMD Radeon HD 6490M graphics, the problem occurred.

  2. Mac with Intel HD 4000 graphics, the problem occurred.

  3. Two Mac with GeForce graphics, they are working fine.

I am still investigating this bug, any help will be appreciated.

Steven

在 2014年6月25日星期三UTC-7下午8时30分00秒,Steven写道:

Hello all,

I just updated my mac to 10.9.4, and the problem went away.

So I think it is safe to say that the bug is specific to certain OS X versions with certain versions of Intel and AMD graphics cards. So far, I haven’t found the problem with a GeForce graphics card in either Windows or OS X.

I will still keep an eye on this thread, so if someone finds something new, please let me know.

Thanks,

Steven

在 2014年6月27日星期五UTC-7上午2时11分18秒,Steven写道:

Hi folks,

I was looking to post about this problem myself.

I'm using b30, and have basically got the following code in place for my 'app':

/***** *****/
  var zones = ;
  var zoneoutlines = ;
  var longids = ['AA','AB','AC','AD','AE','AF','AG','AH','AJ','AK','AL','AM','AN','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ'];
  var latids = ['YM','YL','YK','YJ','YH','YG','YF','YE','YD','YC','YB','YA','XZ','XY','XX','XW','XV','XU','XT','XS','XR','XQ','XP','XN','XM','XL','XK','XJ','XH','XG','XF','XE','XD','XC','XB','XA','WZ','WY','WX','WW'];

  var longid = 0;
  var latid = 0

  for (var lon = -64.0; lon < -52.0; lon += 0.5) {

      for (var lat = -57.0; lat < -47.0; lat += 0.25) {

        var theid = latids[latid] + longids[longid];

      zones.push(new Cesium.GeometryInstance({
        geometry : new Cesium.RectangleGeometry({
          rectangle : Cesium.Rectangle.fromDegrees(lon, lat, lon + 0.5, lat + 0.25)
        }),
        id : theid,
        attributes : {
          color: Cesium.ColorGeometryInstanceAttribute.fromColor(myGrey)
        }
      }));

      zoneoutlines.push(new Cesium.GeometryInstance({
        geometry : new Cesium.RectangleOutlineGeometry({
          rectangle : Cesium.Rectangle.fromDegrees(lon, lat, lon + 0.5, lat + 0.25)
        }),
        attributes : {
          color : Cesium.ColorGeometryInstanceAttribute.fromColor(myBlue)
        }
      }));

      latid++;

    }

    longid++;
    latid = 0;

... ...
... ...

  myPrimitives.add(new Cesium.Primitive({
    geometryInstances : zoneoutlines,
    appearance : stdAppearance,
  }));

  myPrimitives.add(new Cesium.Primitive({
    geometryInstances : zones,
    appearance : stdAppearance,
  }));

... ...
... ...

Bottom line is when I moved from b28,b29 all was fine, and moving to b30, the RectangleGeometry is not 'smooth' in the 3D view, it works fine enough in 2D and Columbus, but 3D is pretty much rubbish, flickering in and out.

In a different post, Patrick said that all you need is to assign an ID to a primitive and it is pickable - I found that I NEED to have my RectangleGeometry primitive have an ID and it CANNOT be transparent. This means that the flickering of a non-transparent surface is unavoidable. It only happens in the 3D view, so I wonder if it is a terrain-server thing ?

The red polyline is a CZML track of a fishing trawler... In 3D, it clearly disappears under the waves, poor fishermen...

http://www.shc.co.fk/images/cesium/fritzed.png

http://www.shc.co.fk/images/cesium/notfritzed.png

This has only started after I moved to b30, and I'm using Linux Mint 17 on a Dell Precision m6400

cheers,

Brian