-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polygon blinking on hierarchy update #7934
Comments
Thanks for the Sandcastles and the minimal code examples @IgnacioRoldan ! On one hand, this is intentional in that entity geometries are created/updated asynchronously (see my response and some elaboration here #7782 (comment)). On the other hand, this is something that has come up dozens of time on the forum over the last year, and especially in cases like when you have requestRenderMode on, you really don't want to use a CallbackProperty and update it every frame when it may be updating much less frequently. I think we should leave this open to see what others on the team think here. One option could be to expose an This could be a larger issue though because I think throughout the entity system, the assumption is that properties are static by default, so changing a position property may not update the underlying primitive in some situations (I think). |
Hi @OmarShehata, thank you for your response. I see your point with the creating/updating asynchronously and I can understand that this may be better is most cases. However, why this used to not blink in version 1.50? The behaviour was changed in posterior versions? It was a bug in the version 1.50? |
Dear @OmarShehata, is there any update regarding this issue? We have created a new example updating the polygon hierarchy instead of clear the entities and add a new polygon, but the behavior is the same. |
@jpespartero you'll need to use a CallbackProperty as I describe here #7934 (comment) to mark the polygon as dynamic. |
Dear @OmarShehata, thanks for your response. We had already implemented the polygon update with callbacks. In that case, the update is done correctly without blink but we have a performance drawback. We are using the Explicit Rendering mode (requestRenderMode=true), as we usually updates the polygons at low frequency (1-2 seconds). In this mode, the GPU and CPU usage is very low (<1% in a MacBook Pro 2017 laptop). The issue with the callback mode is that the GPU and CPU usage increases significantly (>30%). It seems that the callback is being called continuously, not only when a request render is made. See attached an example with requestRenderMode=true and a callback function. The fps panel shows that it is executing in throttled mode, instead of explicit rendering. Is there some way that the callback will only be called when scene.requestRender is called? Or is it the expected behavior? |
@jpespartero, unfortunately this is a known issue. Using a CallbackProperty with requestRenderMode will essentially force a redraw every frame. I've complained about this and suggested a solution here: Feel free to bump that issue/continue discussion there to get support for a better solution here. |
The blinking is due to using static entities. They blink because they render asynchronously. As @OmarShehata stated, using a |
@hpinkos the issue with the CallbackProperty is that forces a redraw every frame and the requestRenderMode does not work, increasing significantly the CPU/GPU resources usages for a scene that is updated at low frequency (1-2 seconds). This issue is discussed in #6631 as @OmarShehata stated, but I don't know if it's better to leave the issue open until the other one is resolved. |
@jpespartero This is unfortunately one of the shortcomings of the Entities API. It is really efficient at drawing things that either never update, or update constantly, but its not ideal for things that update intermittently. Instead, you could try using lower level Geometry and Appearances. You can see how to draw a polygon in this example: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Apps/Sandcastle/gallery/development/Polygon.html When you need to make changes, you would remove the old primitive, create a new one, then |
@hpinkos many thanks for the response, we are going to implement it in that way. |
Hi,
I have defined a polygon and I am updating his vertices periodically with a different period of the render cycle. In version 1.50 this used to work nice, but in the new version the polygon blinks everytime the positions are updated. I have made four sandcastles to show this behaviour:
Version 1.50, property perPositionHeight=true (it works GOOD)
https://cesiumjs.org/releases/1.50/Apps/Sandcastle/index.html#c=7VVdT9swFP0rVl+ais5pQQgJClpVkFYJNgTdXpY9uMltas2xu2s7I0z89918tEkHD5vYy6RZVWP73HOuP47tXCDLJXwHZOdMw3c2Ayt9xj9VfUE/rpozo52QGrA/ZD8izajITKSAxS2aXCbEPt0yYwThYCEV3IjNPWAuY5jvBweNRlk8qpa79FIlNybxCj6iCvpTa8HZcAEPziPY8L2gr1BXAt16Pu8PapmnwbCuLIWFa1EA3sr4azWmlVAWGjQFE5vkWTfCNw/W3YEmjHID4Q79Fs7Eg8x8VsMLmcFsLXRaBs31Smrpikg/Dc4iHemc1jIRTtwbjzHsr+fMW2eyyx0aRL246op6JbneAt6yLRdJErTtNgNCcmtUkRpNGdoADtpJJxtis8BaZOVI+3eQsE1Dop/1uBIx9JspbpFT1tmXtQQUGK+LdndmtOxUE/qIr5AmAykC2CmiKILPb8bjYz4asqMT+m9l/rTsZA5fKTM6qWSOXitzWMmM/44MTe3LoCOU0UlBKTonYGaUQX53ddlYe2euSNNRmGuKz4UKsLLjkB2PRiXchfyGTAFTOoVDdjiq8UivvI6dpE2umcGg2erGeDYGDXzvKAQl8WnrOklmG511dNo0O62XzIiQmRymSgX1OKqc/13877qYHTBZO7ms/a6bO1Ebup6NlaWJ3oFM1665b381fPXIsAOyHT/eObF266Mx2cIEL9hmcNYb9ibWFQouaom3MtsYdOU7E3AeOsg2isZpw6WnN8Lx2Noy3yTckiaJzJlMzumC3n/7oh6LlbCWkJVX6l4+QtS7mIQUv0dTRiRSpx9yQCWKMmQ9vriuOznnk5Caz1nOGLUU2FH8CQ
Version 1.50, property perPositionHeight=false (it works BAD)
https://cesiumjs.org/releases/1.50/Apps/Sandcastle/index.html#c=7VVNTxsxEP0rVi7ZiNSbgBASBNQocIgELYK0l24PjneSWPXa6dheWBD/vbMfySaCS0svlWpFie03743teY5zgSxX8ADIzpmBBzYBp0LGv1ZzUVdWw4k1XigD2O2z58QwaioTS8DiFm2uUmKfbpgSQXiYKQ03Yn0PmCsJ0/3gqNEoW0DdcudB6fTGpkHDF9RRd+wceBfP4NEHBBd/EvQr9JVAv5pOu71a5qXXrztz4eBaFIC3Sv6o1rQQ2kGDLsFKm76aRvgZwPk7MIRRbiDcY9jAmXhUWchqeKYymKyEWZZBU7NQRvkiMS+9s8QkJqezTIUX9zaghP3znATnbXa5RaOkI6uppFOS6xLwlu24SNOoHbcZENJbq4ulNZShDeBgvPKqITYHbERWrrR7BylbNyT6uIALIaHbbHGDnLKduqwUoEC5KtrqTOjYqSfMEV8gbQaWCODGiKKIvn0YDo/5oM+OTui7lfndtpU5fKfM4KSSOXqvzGElM/w7MrS1770doYxuCiqxcwMmVlvkd1eXjbW35koMXYWpofhc6AgrO/bZ8WBQwrtQWJMpYEy3sM8OBzWemEUw0isqcs2Mek2pG+M5CQb43lWISuLLxnWKzDY429Fp02y13jIjQmZzGGsd1euocv538b/rYnbAVO3ksvenbq5eEHZAnuLHW5vVVnyyNpvZ6A1P9M46/c7I+ULDRS3xUWVri758RCLOYw/ZWtMiXDwP9AB4Lp0r843iDWmUqpyp9Jz+ffcftqTDpBbOEbIIWt+rJ0g6F6OY4vdo2opUmeXnHFCLogxZDS+u60nO+Sim4WuWt1bPBe4o/gI
Version 1.57, property perPositionHeight=true (it works BAD)
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=7VVta9swEP4rIl/i0MxOWkqhTcNCWlig3UKa7cu8Dxf7nIjJUibJbt3R/77zS/yyFrbRfRnMhNjS3fPcSfeclIJmKcd71OySSbxnczQ8id1PxZzTD4rhXEkLXKLuD9l3XzJ6eAxb1NlSq5SHhD4/IAONYHHNBd7C/g51ygNcdJ2diiN/Ei0a7CbhIrxVYSLwoxZOf2YMWuOt8cEmGo33HugN4hq03S0W/UFJ8zQYlh8bMHgDGeolD74WOUUgDFbWLapAhc+mNX5L0NgVSrJRbCS71cnBHMMDj5O4NK95jPMdyG3utJARl9xmvnwaXPjSlyntZQgW7lSiA+zu5zwxVsVXtdXxe0Ex5fdycFkCt0EbF8LQacZNBI3hUolsqyRFaBxclJZbXgGrDZYQ55n2VxiyfQWin0l0BAH2qyUeLOesVZcdRw062GVNdea07fQF8sSNNC0GtxrRzLSGzPn8Zjw+dUdDdnJG/w3Nnz41zfEraUZnBc3Ja2mOC5rx36GhpX0ZtIhi6hTNodUBcyWUdlfXV5W0a3H5klphIck/BeHoQo5Ddjoa5ea2KdmTKHBGXThkx6PS7ssokYHlVOQS6QyqUlfCMwFKdDut4OTAp4PqOIltdNHiacLUXC+JUWOsUpwJ4ZR5FDH/q/jfVTE7YrxUcv71u2puee3peFaG5yJ6h3y7s9V5+7Pgi0uGHZHs3NNaiaVaH5WK18p5QTY5tDfsTYzNBE5Lkrc83itt85vGcV3PYrwXlKnxNgndEtYNTAGbeAfQJOQp4+ElHdHd28/vsUCAMWSJEiHu+CP6venEI/8OTCgIudx+SFELyHKX3Xh6U066rjvxaPgcZZUSG6AgVd4TCxuBdUQuI7UEiaJ2KJ02Ksw6E3rarfHEhtMbjCwx0bXIrGLUWwwYZWfxgbIhewvvdQle5lsVhasJjaWmKq47s4M9/oKThq2kaZSvM9+Kakt+AA
Version 1.57, property perPositionHeight=false (it works BAD)
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=7VVta9swEP4rIl/i0MxOWkqhTcNCWlig3UKa7cu8Dxf7nIjJUibJbt3R/77zS/yyFrbRfRnMhNjS3fPcSfeclIJmKcd71OySSbxnczQ8id1PxZzTD4rhXEkLXKLuD9l3XzJ6eAxb1NlSq5SHhD4/IAONYHHNBd7C/g51ygNcdJ2diiN/Ei0a7CbhIrxVYSLwoxZOf2YMWuOt8cEmGo33HugN4hq03S0W/UFJ8zQYlh8bMHgDGeolD74WOUUgDFbWLapAhc+mNX5L0NgVSrJRbCS71cnBHMMDj5O4NK95jPMdyG3utJARl9xmvnwaXPjSlyntZQgW7lSiA+zu5zwxVsVXtdXxe0Ex5fdycFkCt0EbF8LQacZNBI3hUolsqyRFaBxclJZbXgGrDZYQ55n2VxiyfQWin0l0BAH2qyUeLOesVZcdRw062GVNdea07fQF8sSNNC0GtxrRzLSGzPn8Zjw+dUdDdnJG/w3Nnz41zfEraUZnBc3Ja2mOC5rx36GhpX0ZtIhi6hTNodUBcyWUdlfXV5W0a3H5klphIck/BeHoQo5Ddjoa5ea2KdmTKHBGXThkx6PS7ssokYHlVOQS6QyqUlfCMwFKdDut4OTAp4PqOIltdNHiacLUXC+JUWOsUpwJ4ZR5FDH/q/jfVTE7YrxUcv71u2puee3peFaG5yJ6h3y7s9V5+7Pgi0uGHZHs3NNaiaVaH5WK18p5QTaHXukNexNjM4HTkugtj/dK2/y2cVzXsxjvBWVrvE1CN4V1A1NAJ94BNAl5ynh4Scd09wb0eywQYAxZokSIO/6Ifm868ci/AxMKQi63H1LUArLcZTee3pSTrutOPBo+R1mlxAYoSJX3xMJGYB2Ry0gtQaKoHUqnjQqzzoSedus8seH0BiNLTHQ1MqsY9RcDRtlZfKBsyN7Ce12Cl/lWRfFqQmOpsYorz+xgj7/gpGEraRrl68y3otqSHw
The conclusions are:
I think it should work always as 1. so it migth be a bug.
Regards,
Ignacio Roldan.
The text was updated successfully, but these errors were encountered: