To access the tutorial projects in ArcGIS CityEngine, open CityEngine and click Help > Download Tutorials and Examples in the main menu. After choosing a tutorial or example, the project is automatically downloaded and added to your CityEngine workspace.
In this tutorial, you'll learn how to export CityEngine layers to Scene Layer Package (SLPK) and Tile Package (TPK) files. You'll then share the .slpk and .tpk files to ArcGIS Online. Finally, you'll add these as layers to Scene Viewer to create a web scene.
Export and upload Scene Layer Packages
- Expand the Tutorial_15_Publish_Web_Scenes tutorial folder in the Navigator window.
- Open the Esri_Campus.cej scene in the /scenes/ folder.
Generate the models when prompted.
- Select the Dev HQ.Exterior Walls layer in the Scene Editor window.
- Click File > Export Models or press Ctrl+E to start the exporter.
- Select Esri Scene Layer Package:
- Click Next to open the Esri Scene Layer Package dialog box:
- Keep the default export options but change the Scene Name to Esri_Campus_Walls.
For more details about exporting SLPK files , refer to Export SLPK.
- Click Finish.
The exporter creates a Scene Layer Package (.slpk) in the /models/ folder of the project.
- Right click the Esri_Campus_Walls.slpk file and click Share As.
- Ensure that the Publish package after upload check box is checked.
- Click Share.
Sign in to ArcGIS Online if you are not already signed in to continue uploading.
Next, you'll export and share the rest of the layers as one .slpk file.
- Select the following layers in the Scene Editor:
- Repeat the steps above to export the newly selected layers.
In the Esri Scene Layer Package dialog box, this time name the scene Esri_Campus in the Scene Name box.
Export and upload Tile Packages
Next, you'll export the terrain to add into the web scene in ArcGIS Online.
- Select the Terrain layer in the Scene Editor window.
- Click File > Export.
- In the CityEngine folder, click Export Selected Layers as TPK:
- Click the Maps drop-down menu and select Basemap only:
As the elevation was not edited, you'll use the elevation service in ArcGIS Online and only need the basemap of terrain. But if you had custom elevation, you could export the elevation in this same manner.
- Click Finish.
- Right-click the Esri_Campus_Basemap.tpk file in the /data/ folder and select Share As.
- As you did with the .slpk file above, ensure that the Publish package after upload check box is checked in the Tile Package dialog box.
- click Share.
Combine scene layers into a web scene
- In the Navigator window, click My Content to verify and all files and layers are there:
- Right-click the Esri_Campus_Walls file and select Open in browser to open the item in ArcGIS Online.
Again, if prompted to sign in to ArcGIS Online, do so.
- Click Open in Scene Viewer to open the item in Scene Viewer.
- You can then search and add the Esri_Campus and Esri_Campus_Basemap layers in Scene Viewer to get the following scene:
- Hide the walls by unchecking the Esri_Campus_Walls layer in the Layers menu at the top.
This allows you to see the lower levels more easily.
- Save the scene and name it Esri_Campus.
- In My Content in the Navigator window, right-click the empty space and click Refresh.
The new Esri_Campus web scene appears:
The web scene is ready to share with others.
In this tutorial, you learned how to do the following:
- Export CityEngine layers as Scene Layer Packages (SLPK) and Tile Packages (TPK).
- Share these layers to ArcGIS Online.
- Create a web scene in Scene Viewer you can share with others
To continue your learning with CityEngine, see the complete CityEngine tutorial catalog.