Export 3ws (CityEngine Web Scene)

CityEngine Web Scene (3ws) is a custom, web-optimized format that can be shared on ArcGIS Online and viewed with CityEngine Web Viewer.

Note:

The 3ws format is deprecated and may not be supported in future releases of CityEngine.

Select the content you want to export in the Viewport window, and begin exporting. Click File > Export Models > CityEngine Web Scene.

Export options

In addition to the general export options, the 3ws export includes an export page with the following layer options:

OptionDescription

Export

Check boxes denote if a layer's contents are exported.

Layer Name

The layer name, as it is set in the CityEngine scene.

Layer Group

Layers can be combined into layer groups. All layers with the same group name are collected in a layer group. In CityEngine Web Viewer, only one layer of a group is visible at a time (exclusive visibility). All layer groups enable Swipe View in CityEngine Web Viewer.

You can name CityEngine scene layers to automatically have their layer group set using the pattern GROUPNAME.LAYERNAME.

Scene Editor with group layer naming
The Scene Editor is shown with group layer naming.

Texture quality options

For 3ws export, the following texture quality options are available:

OptionDescription

Scene settings

Use the Global setting for Textures on the first export dialog box. (This is only available as a per-layer option.)

High Quality

Convert all layer RGB textures and store with high quality.

Medium Quality

Convert all layer RGB textures and store with medium quality.

Low Quality

Convert all layer RGB textures and store with low quality.

Half Sized

Resize all layer textures by 50 percent; RGB textures are written as medium quality JPG.

Compact

Resize all layer textures by 50 percent but with a maximum of 256x256 pixels; RGB textures are written as low quality JPG.

Original Textures

Use original textures.

Note:
Only JPG and PNG textures are supported in Web Viewer. Other texture formats appear black.

No Textures

Do not include textures in layer objects.

Individual layer options

For 3ws export, the individual layer options described below are available.

Layer state options

For 3ws export, the following layer state options are available:

OptionDescription

Backdrop

The layer does not appear in the layer pane; it is always visible.

Visible

The layer appears in the layer pane and can be set as visible or hidden. The initial state is visible.

Hidden

The layer appears in the layer pane and can be set as visible or hidden. The initial state is hidden.

Interaction options

For 3ws export, the following interaction options are available:

OptionDescription

Scene settings

Use the Global setting set for Object Interaction on the first export dialog box.

Locked

Objects in this layer cannot be selected. All objects are combined into a single entity. Locked layers contain a smaller object count than selectable layers, which can often improve performance in Web Viewer. Since all objects are combined, per-object metadata cannot be written (there is no metadata only option).

Pickable

Objects in this layer can be selected, and all objects are exported as single entities (features). A high object count in a layer can decrease performance. It is recommended that you use this option only when required.

Metadata options

For 3ws export, the following metadata options are available:

OptionDescription

Scene settings

Use the Globalsetting for Object Metadata on the first export dialog box.

All

Write both object attributes and reports to object metadata.

Attributes

Write object attributes to object metadata.

Reports

Write generated report data to object metadata.

None

Do not include object attributes or report data.

Texture quality options

For 3ws export, the following texture quality options are available:

OptionDescription

Scene settings

Use the Global setting for Textures on the first export dialog box.

High Quality

Convert all layer RGB textures to JPG with high quality.

Medium Quality

Convert all layer RGB textures to JPG with medium quality.

Low Quality

Convert all layer RGB textures to JPG with low quality.

Half Sized

Resize all layer textures by 50 percent; RGB textures are written as medium quality JPG.

Compact

Resize all layer textures by 50 percent but with a maximum of 256x256 pixels; RGB textures are written as low quality JPG.

Note:

In all texture quality options except Original Textures, the texture size is limited to 2,048 pixels.

3ws export features

Bookmarks defined in a CityEngine scene are exported directly to a web scene and are available from the bookmarks menu of CityEngine Web Viewer.

Note:
  • Different camera angles are currently not supported. Web Viewer displays all views and view bookmarks with the default CityEngine angle (54 degrees).
  • The current camera position and direction before starting the export are stored in the web scene and used as the initial view in CityEngine Web Viewer.

The current shadow and ambient occlusion settings of a CityEngine scene are exported to the .3ws file and are used as initial values in Web Viewer. On some computers, when you enable shadow and ambient occlusion before exporting, Web Viewer may not support direct or diffuse shadows or performance may be impacted.

Note:

As initial settings are stored during export, changing options (such as shadow settings) in Web Scene preview do not change the initial configuration of the web scene.

Export tips

Due to browser limitations and to ensure compatibility on less powerful systems, it is recommended that you keep web scene size (the size of the .3ws file) below 15MB. Reduce web scene size by doing one of the following:

  • Choose a smaller extent for export (select fewer objects).
  • Use a smaller terrain resolution (512x512 or less). Terrain resolution can be set in the Inspector pane of Terrain Layer, Layer Attributes, terrain resolution u and v.
  • Fine-tune the texture quality export options (use compact or half-size).
  • Manually convert textures to lower-resolution JPG or PNG and use the Original Textures option.
  • Set the Interaction export option to locked when a selection is not required.
  • Reduce the geometric complexity of the models (for example, lower level of detail or less details on streets).

By default, terrain geometry is simplified during export. This can take a while for complex terrains. To speed up this process, do one of the following:

  • Use a smaller terrain resolution (recommended 512x512). Terrain resolution can be set in the Inspector pane of Terrain Layer, Layer Attributes, terrain resolution u and v.
  • Turn off Simplify Terrain Meshes in the Main export options under Optimizations (not recommended, as this increases .3ws file size).
  • When setting texture quality to Original Textures, ensure that the layer only uses JPG and PNG textures. Other formats are not supported by WebGL and appear black in Web Viewer.
  • When preparing web scenes, keep in mind that a web scene may not run as well (or run at all) on other, less powerful systems (less memory, less powerful graphics card). Reduce the exported extent and .3ws file size to ensure wider compatibility.

Preview a CityEngine web scene

Before publishing a web scene, it is recommended that you preview it locally to ensure that it contains all the applicable data and the layer setup is correct.

  1. Locate the exported web scene (.3ws file) in the CityEngine Navigator window (by default, web scenes are exported to the current project's model folder).
  2. Double-click the .3ws file or right-click it and click Open With > CityEngine Web Scene Viewer.

    Web Viewer opens in your default web browser.

Preview options

You can preview web scenes using the following options:

OptionDescription

3D Web Scene Viewer

This option opens CityEngine Web Viewer from ArcGIS Online. An internet connection is required.

3D Web Scene Viewer (offline)

A local version of CityEngine Web Viewer is used. No internet connection is required. The local viewer may not be as up to date as the online version.

The preview URL opened in the browser is in the form http://localhost:61351/ceviewer.html?3dWebScene=/PATH_TO/WEBSCENE.3ws or http://localhost:61351/ceviewer_offline.html?3dWebScene=/PATH_TO/WEBSCENE.3ws for the offline version. The path to webscene.3ws is relative to the CityEngine workspace (web scenes must exist in the CityEngine workspace to be previewed). A random, varying high port is set automatically by CityEngine.

Due to browser security restrictions when loading local files (for example, the .3ws file), a local web server is required for Web Viewer. Starting Web Viewer with a file protocol (file://...)—for example, when starting Web Viewer by double-clicking the viewer.html—does not work.

Default browser

When starting the preview Web Viewer application, CityEngine starts the web browser that is set as the default browser on the computer. To preview in a different browser, change your system's default web browser or copy the preview URL to the new web browser.

Preview notes

All initial configuration settings of a web scene (for example, camera position or shadow settings) are done during export. Changes done in the web scene preview are not stored in the web scene and do not influence the initial configuration.

Upload to ArcGIS Online

Complete the following steps to upload a web scene to ArcGIS Online:

  1. Locate the exported web scene in the Navigator window.
  2. Right-click the web scene and click Share As.

    The CityEngine Web Scene Package dialog box appears.

  3. Click Upload package to my ArcGIS Online account and name the web scene package.
  4. Fill in the required fields for Item Description.
  5. Click Analyze to validate the web scene for any errors or issues.

    You must validate and resolve all errors before you can save the web scene to disk or share it to ArcGIS Online. If any issues are encountered, an error is reported. You must fix the error before you can continue.

  6. Click Share to upload the web scene to ArcGIS Online.
  7. Click File > ArcGIS Online and go to My Content to find the web scene online for sharing.
Note:

If the web scene already exists on the portal, the web scene is updated with the new version and keeps the same ID.

Package a web scene and Web Viewer to a .zip file

Instead of publishing to ArcGIS Online, you can create a .zip file of the web scene and Web Viewer application, which you can manually upload to your web server.

  • Follow the steps in the previous section but choose Save package to file in the web scene package dialog box.
  • The .zip file created contains two folders:
    • webscenes—Contains the .3ws file
    • webviewer—Contains the Web Viewer application files

Upload to a custom server

Copy both folders to your web server. To start the Web Viewer, type the URL (http://SERVER.DOMAIN/PATH/TO/WEBVIEWER/viewer.html?3dWebScene=../webscenes/NAME_OF_WEBSCENE.3ws) in your browser.

Once the Web Viewer application is uploaded and you create web scenes, you must upload the .3ws files to the webscenes folder and adapt the URL to reflect the respective web scenes with the query parameter ?3dWebScene.

Note:

Due to browser security restrictions when loading local files (for example, the .3ws file), a local web server is required for Web Viewer. Starting Web Viewer with a file protocol (the URL starts with file://...)—for example, when starting Web Viewer by double-clicking the viewer.html—does not work.