-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Performance degradation with large point clouds and show condition on M1 Mac #11270
Comments
Thanks for the report @ulrichson!
Do you mean in a previous release, or just when an M1 machine is not being used? We have seen some rendering problems on M1 machines, but they tend to be rendering artifacts rather than degraded performance. In general, |
@ggetz Glad to hear, thanks! I mean with a previous Cesium release. To verify I just ran an older version of my project where Cesium Is there a way to disable picking for |
Thanks for clarifying! And we'd definitely appreciate the help. 1.97 would be the first release I'd suspect that this began occurring. There was a major 3D Tiles and model refactor that went out as a part of that release.
Not through the public API. If you're willing to modify the source code, it's possible to skip the 3D Tiles pass when picking. |
@ggetz I re-tested with Can you please give me a hint where in the source code this change would be required? |
There was a fairly large refactor that went in with that change. @j9liu would you be able to recommend a place to start looking regarding changes from ModelExperimental related to performance picking point clouds? |
Hey @ulrichson, Sorry about the delay. This completely slipped my radar. I'm happy to take a look -- I should have a moment by the end of this week. |
Thanks @j9liu 😊 |
Hi @ulrichson, I don't have an M1 Mac, and I can't reproduce this behavior on Windows. But I'm curious to see the debug profile that demonstrates the difference with / without this condition. In any case, there's an individual |
Hi @j9liu, thanks, I'll give it a try! Here's a snapshot of the profile on my M1 machine when the |
Update: maybe it's not related to the |
In 1.97 we switched to a completely different Here's the state of CesiumJS in the 1.96 release. You can see how In the new So that's why I'm confused. If the new |
Sure, thanks for looking into it! Here's the profile with And without: trace-without-show.json.zip |
Thanks @ulrichson ! I'll try to take a look by the end of this week :) |
We are experiencing the same performance issue , see #11196 . Our tilesets are generated with Agisoft Metashape. Prior to version 1.97 there were no problems but starting from 1.97 we observe the same behavior as reported in this issue the only difference is that we do not apply any styling. |
@j9liu Thanks! I tested with
It seems so, I made the following change in if (model.allowPicking) {
console.warn('Disabled PickingPipelineStage')
// pipelineStages.push(PickingPipelineStage);
} With the disabled I did another test and tried to fake the |
Another observation: I checked if |
I have a similar observation with a large performance hit on integrated Intel graphics (in particular Intel® UHD Graphics for 10th Gen Intel® Processors as in the i7-10510U). The issue does not show on the dedicated GPUs I have access to. I have found a one-line fix, that improves the performance a lot in my case: In packages/engine/Source/Shaders/Model/CPUStylingStageVS.glsl in void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
{
float show = ceil(feature.color.a);
//positionMC *= show; // this line causes the performance hit
#if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
filterByPassType(positionMC, feature.color);
#endif
} Note that you may need to re-build Cesium to re-generate the To anyone who is able to reproduce this performance issue, please check if this improves the performance for you. My theory is as follows:
A proper fix for that would be to actually move the hidden points off-screen, i.e. setting |
We have that on all Os and hard ware variants. I have a gui setting shader dynamically. Even applying a new style without anything but point size keeps low frame rates. ReadPixels is big in my profile for me also when setting pixel colors. Applying a new default style is a large performance hit on fps |
Any updates, we are no changing our data as a workaround but love to get this back |
@katSchmid did you ever find any resolution to this? |
Hello!
I observed a performance degradation when rendering large points clouds that use the conditional
show
attribute. I'm certain that the performance was much better, in a project I'm using such a technique to filter for attributes from the tileset's batch table and now the framerate drops a lot when the filters are applied. Maybe it only affects macOS / arm architecture — on a Linux / Intel workstation with NVIDIA GPU it works fine.A quick performance monitoring in the dev tools showed that
readPixels
consumes a lot of time which is called for scene picking. Is there a way to turn off picking forCesium3DTileset
? That might help in my case.I can reproduce this in a sandcastle with the Melbourne point cloud, and you can see the framerate drops from ~100 fps to ~10 fps when zooming in:
Screen.Recording.2023-05-05.at.12.22.49.720p.mov
Sandcastle example:
https://sandcastle.cesium.com/#c=hVNha9swEP0rRxiNA0FO10K71AkbKYyMjkBT9slfFPkai8m6IJ2TuiX/vXJsZ0nZmMFg3b33dO9JjmP47qRlmKHXZfFjCVIp9B6YoKLSgSYL0ntkn1pF1jNsNe7QwQQs7lqa+HWoRWlPHdYzsiy1RZf2BnepTW0kfWUVRAOYTOEttQDsquYDWkGBL4w2i1rFptgsru6ftEE/t36Disn91C/a1sI1uxmKawBymErupO7siDM+snh2VMzJfqsNzbPo+urLzW0n1EqIDWnLM0Nltsxlpu06iLaThkdymLKUHHIZBxMlDo8trPCeCnzQ65wD7T/tJTu0a87HcPlPzGPYv/R/EPu7s8S8Qoti43ShWW/RC5llUWujc9XE0RJeiYon+gjpjHuuDJ6f62l+y7odHZM4xLTUrziG66MBRYbcGPpuvYo+j0bD9h30jwif0y4APr3NFg+Lx71wMIWRuIGLCzipJaF2229NN3PuQUlWOUToHLlBdyT18ZNBYWjddhp0aveDqP7uDXvJwdm0rn/VxYYcQ+lMJETMWGyMZPTxqlS/QwbK+5qUxB0lyfQWdDb5y9UGZcKfETrPpTF1EmlvmsQBf0YzdLhEiy06I6sAqcdI8svpQ9MQQiRxWNabfuQykVlJd6L7Dg
Browser: Google Chrome Version 113.0.5672.63 (Official Build) (arm64)
But similar experience with Safari / Firefox
Operating System: macOS 13.3.1 (a) on M1 Max
The text was updated successfully, but these errors were encountered: