iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
600 stars 210 forks source link

Drape models on the terrain tool with some issues #3736

Closed miguelsoares1624 closed 2 years ago

miguelsoares1624 commented 2 years ago

We’ve started using model map layers in WaterSight to drape models on the terrain surface and have noticed a possible bug. If we enable 3D terrain and rotate away from the top view, we start getting jagged lines. If terrain heights are not applied to the map, rotating the model does not cause distortion. The drape models tool is available on version 3.1, and basically puts any imodel (such as pipes) clamping to the ground when using 3D view, so they do not seem flying in the sky.

image

To Reproduce Steps to reproduce the behavior:

  1. Go to https://watersight.bentley.com
  2. On the left side menu, please click on Real time simulation >> Current simulation image
  3. On the Layers section, please enabled Show terrian image
  4. Rotate the model using the Shift + scroll button the mouse or use the rotate button image located on the top right side to rotate the view
  5. You will notice those vertical lines being added below the pipes image
  6. Important note, these particular pipes in the i-model were generated from an hydraulic model uploaded in WaterSight. We can also check the same is happening with the shapefiles we import and that are bridged to an i-model
  7. So now lets disabled the pipes from the hydraulic model >> turn off the pipes image 8 - Now lets turn on the pipes in the i-model that come from a shapefile >> in the layers tab please enabled the pipes image 9 . You can see that the pipe shapefiles that are bridged to an i-model have the same issue. image
  8. This only happens if we use the draping/clamping to the ground tool. If we do not use that tool, the pipes will be flying in the sky but with no vertical lines.

Expected behavior No vertical lines should appear below the pipes

Screenshots See image above

Desktop (please complete the applicable information):

Additional context Please reach to anthony.barletta@bentley.com for questions.

pmconne commented 2 years ago

Looks like the model is draped onto the terrain skirts and drawn without depth.

image

I fail to reproduce this in display-test-app - while the terrain tiles are loading I can see the frontmost tiles have the model draped onto the skirts, but when tiles in front of them load the drape and the skirts are correctly obscured.

pmconne commented 2 years ago

I can reproduce the problem in display-test-app if I attach the layer as an overlay instead of background layer. WaterSight attaches overlay layers. @miguelsoares1624 please confirm the problem no longer occurs if you attach background layers instead. @mdastous-bentley do you understand what if any difference there is between draping an overlay and background model map layer? The documentation offers no description of the distinction between background and overlay.

anthony-barletta commented 2 years ago

@pmconne The problem no longer occurs when we attach background layers.