Turn off vertical exaggeration for some Models in the Scene
Feature
As reported by @Jean-Dum in https://github.com/CesiumGS/cesium/issues/11936: Scene.verticalExaggeration exaggerates every Model on the screen:
Some users may want to show exaggerated terrain, but leave some models unscaled. This was the behavior of the old Globe.terrainExaggeration which has been removed since v1.116.
@Jean-Dum can you add some context about your use case for exaggerating only part of the scene? This will help us prioritize the issue.
Thank you for openning this issue @jjhembd
I don't really know which solution would be the best to let the user choose on which object to apply verticalExaggeration, but it could be one of those options:
- Split behaviours between two different values (for example
terrainExaggerationandmodelsExaggeration) - Allow the user to deactivate
verticalExagerrationfor a given datasource (add an optiondisableVerticalExaggerationtoCustomDataSource) - Allow the user to deactivate
verticalExaggerationfor a given model (add an optiondisableVerticalExaggerationtoModelGraphics)
Maybe there is another solution which could be better for everyone!
Hi @jjhembd , setting exaggerated parameters for different models is an important feature. Is there a plan for the next step in addressing this issue?
Hi @syzdev, we don't have a planned date for this yet
If you'd like to add more information about your use case, that may help us prioritize. If you are interesting in contributing, please let us know and we'd be happy to discuss implementation or review a PR. Thanks!
@ggetz I strongly agree with the several optimization solutions listed by @Jean-Dum . Overall, there are not many use cases for this feature. In limited use cases, most users should hope that the behavior of the model and terrain should be separated. However, further, users hope to independently control the exaggeration of each model. For example, in geological analysis use cases, users want to only exaggerate the geological model while keeping other building models above the geological model unchanged.
Of course, these suggestions will cause significant changes to the feature itself, and I am also very curious about what other users use cases are. I believe that more users need to participate in the discussion regarding this issue.
Hi @ggetz, I have a use case which only exaggerate terrain and not exaggerate model. In the ocean, underwater mountain can be showed by exaggerating terrain, but a ship should not be exaggerated .
Thank you @liubangbo for your comment. I have exactly the same use case as you have. The fact that models and terrain exaggeration are now linked together completely prevent me from updating Cesium to its latest version.
Thank you @liubangbo for your comment. I have exactly the same use case as you have. The fact that models and terrain exaggeration are now linked together completely prevent me from updating Cesium to its latest version.
@Jean-Dum Hello, could you please tell me which version of Cesium you are currently using? I have tried downgrading to version 1.116 or earlier and adjusted the value of Globe.terrainExaggeration, but the models are still distorted. Is there something maybe wrong with my codes?
Hello! I am using version 1.110.0, I think the processing of terrainExaggeration has been modified at the same time verticalExaggeration has been introduced, at version 1.113.0.
@Jean-Dum Thank you for your reply. I ended up using the 1.112 build package instead of the version installed via npm. This is because I found that the version of @cesium/engine was incorrect after installing with npm. Directly installing the 6.1.1 version of @cesium/engine also resulted in models being distorted. Anyway, it's good that this solution works for now.
Hello, +1 for me as well.
I have a need to omit exaggeration on Models. It would be perfect if there was a flag on the model to participate in verticalExaggeration or not. The behavior would be that models could opt-out to exaggerate with the terrain where required. Thasnk much, -TImothy
Hello,
I have a fork that fixes this issue (I think) How should I proceed to get it reviewed? Please see: https://github.com/timeichfeld-msa/cesium
Hi @timeichfeld-msa, please see our Contribution Guide for opening a Pull Request for review. Thanks!
@timeichfeld-msa If your fix is working, could you open a pull request? Thank you!