3D: Is clamp on ground / ground clamping working?

1565
8
Jump to solution
08-04-2017 01:43 AM
NorbertThoden
Occasional Contributor III

I set up a ArcGIS Portal, ArcGIS for Server, federate them and setup a couple of Map Image Layer, Scene Layer Packages, Elevation Layer etc.

In our application this services are consumed using ArcGisRuntime for Qt (no QML).

Since a a few weeks i try to add  a single building (as 3D model [flt] or geodatabase [gdb] containing a block of building).

They are visible using simple conditions:

  • using no elevationLayer/baseSurface
  • using an absolute height of the 3D objects

So, some basic functions are working.

My expected workflow is:

  • add basemap
  • add elevation source
  • add some 3D objects (single building / block of building) USING "On Ground" / clamp on ground / ground clamping

But i run into different behaviour if i

  • use the elevationLayer -> often the model isn´t visible anymore (even if i set the basemap invisible)
  • assign the elevation parameter "On Ground" to the object(s) (single building / block of building) -> still flying at absolute height

Is my workflow correct? Any hints?

Are there any known issues (Release notes for 100.1—ArcGIS Runtime SDK for Qt | ArcGIS for Developers) relevant?

Especially "Z-aware feature layers do not render correctly in scene view." let me think, if it´s relevant to me. But i am not sure...

Any help is welcome!

Thanks in advance

Norbert

0 Kudos
1 Solution

Accepted Solutions
EricBader
Occasional Contributor III

Hi Norbert,

At this time, the behavior you see is actually expected. The way it has been designed is, without an elevation source the building will not "drape", or clamp. It needs an elevation.

View solution in original post

0 Kudos
8 Replies
LukeSmallwood
Esri Contributor

Hi Norbert - apologies for the delay in responding to your question.

I will see if I can replicate your problem with a simple application - just to confirm the workflow:

- Create a scene with a basemap (e.g. topographic)

- add an elevation source

- add a graphic which uses a ModelSceneSymbol taking a model in .flt format

- set the SurfacePlacement mode to be "Draped"

Let me know if this is not the approach you are using.

Thanks,

Luke

0 Kudos
LukeSmallwood
Esri Contributor

Hi Norbert,

I have some simple code which adds a ModelSceneSymbol graphic following the above approach - let me know if this is not what you are trying to do.  Make sure you have the anchor position for the symbol set to "Bottom" otherwise the centre-point of the model will be on the ground. I do not have a .flt format model to test with unfortunately so I have used an .lwo from one of our samples.

  // Create a scene using the topographic BaseMap
  Scene* scene = new Scene(Basemap::topographic(this), this);
  // create a new elevation source from Terrain3D rest service
  ArcGISTiledElevationSource* elevationSource = new ArcGISTiledElevationSource(
        QUrl("http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"), this);
  // add the elevation source to the scene to display elevation
  scene->baseSurface()->elevationSources()->append(elevationSource);
  // Create a scene view, and pass in the scene
  m_sceneView = new SceneGraphicsView(scene, this);
  // set the sceneView as the central widget
  setCentralWidget(m_sceneView);
  GraphicsOverlay* overlay = new GraphicsOverlay(this);
  // Edinburgh
  Point p(-3.1774341277692018, 55.946948955260694, 0., SpatialReference::wgs84());
  ModelSceneSymbol* mss = new ModelSceneSymbol(QUrl("~/ArcGIS/Runtime/Data/3D/SkyCrane/SkyCrane.lwo"));
  mss->setAnchorPosition(SceneSymbolAnchorPosition::Bottom);
  mss->setHeight(2000);
  mss->setWidth(2000);
  mss->setDepth(2000);
  Graphic* g = new Graphic(p, mss, this);
  overlay->graphics()->append(g);
  overlay->setSceneProperties(LayerSceneProperties(SurfacePlacement::Draped));
  m_sceneView->graphicsOverlays()->append(overlay);
NorbertThoden
Occasional Contributor III

Hi Luke!

I will see if I can replicate your problem with a simple application - just to confirm the workflow:

 

- Create a scene with a basemap (e.g. topographic)

- add an elevation source

- add a graphic which uses a ModelSceneSymbol taking a model in .flt format

- set the SurfacePlacement mode to be "Draped"

Step 1 and 2 are fine.

But regarding the remaining steps we maybe have a misunderstanding.

I have created a SceneLayerPackage on the ArcGIS Portal / Server publishing a Scene Layer.

While creating this Scene Layer (using ArcGIS pro) i was trying to use ground clamping / on ground.

But maybe your approch is similar enough to get further information...

Have already been able to run the example with the SkyCrane? Can you provide a screenshot?

I will try to reproduce the code.

What´s about the area of Brest, which is used often? (I have to search for the URL)

There are a lot of building... How is the model of this city provided?

Thx in advance!

Norbert

0 Kudos
LukeSmallwood
Esri Contributor

Hi Norbert,

Here's a screenshot of what I see when I run my example code above. The Brest data you mention is a SceneLayer I believe - here is the Url: 

http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer/laye...

0 Kudos
NorbertThoden
Occasional Contributor III

Hi Luke!

Thanks for adding the screenshot and the Brest-URL.

I used both types:

BTW: Why sometime the  "/0" seems to be necessary, sometimes this MUST NOT be included??? (strange)

But the result is very (!!!) slow, and our own access seems to be fast.... I wait for a couple of minutes...
I tried it on two different days...

Very poor or what did you think?

Is there a area, modeled in 3D (SceneLayer) which is not so heavy?
If i look at Folder: Hosted  is assume there should be one?

Can someone help me finding a smaller area? Maybe yout a couple of houses instead of a whole city?

Thx

0 Kudos
NorbertThoden
Occasional Contributor III

Here are two screenshots, with and without elevation, but identical camaera position:

Without Elevation:

Here it´s possible to look "under" the chateau.

With Elevation:

Here it´s NOT possible to look "under" the chateau.

Therefore i assume:

- the current SDK is not able to do ground clamping
(maybe a bug?)

- the service (Scene Layer) does not support ground clamping

Can someone make this clear?

0 Kudos
EricBader
Occasional Contributor III

Hi Norbert,

At this time, the behavior you see is actually expected. The way it has been designed is, without an elevation source the building will not "drape", or clamp. It needs an elevation.

0 Kudos
NorbertThoden
Occasional Contributor III

Hi Eric!

Thank you for your answer.

In the meantime we recognized that we most likely have to use the absolute height for the buildings and other object.

But thank you for your time.