Jump to content

Experimental SDK build: Round Earth Cesium Plugin


photo

Recommended Posts

Long-awaited round Earth is still in progress, and we thought that you might want to have a quick peek.

1.png

 

The Cesium plugin allows creating a full-scale high-accuracy WGS84 globe based on the Cesium data.

At the moment, you can control the geo-oriented camera to fly around using the keyboard and mouse, navigate using geo-coordinates, and enjoy both the orbital scenery and close-ups.

2.png

 

Notice: Currently, only Cesium World Terrain is applicable as the Height data. As for the albedo data, you can use one Imagery source at your discretion.

If you want to check out the new Cesium plugin: 

  1. Log in to the Developers Portal (developer.unigine.com) with your credentials.
  2. Go to the Downloads section and choose Experimental build for your SDK edition (available for Sim only).
  3. Once the SDK ZIP-archive is downloaded, unpack its contents to any location on your computer.
  4. Open the SDK Browser. Go to the Products tab, click Add Installed, then browse to the location of the unpacked SDK and click Select Folder. The SDK will be added.
  5. Make this SDK default by clicking the Make Default button.
  6. Go to the Samples -> Demos section.
  7. Find the Cesium demo and click Install.
  8. As the demo is installed follow the instructions given below.

 

Running the demo

To create the terrain the Cesium plugin uses Cesium ion data (geometry and albedo). That’s why before running the demo you need to register on the official Cesium website to obtain a Cesium token and use geodata.

  1. Register your account on the website.
  2. After successful registration select Access Tokens in the top menu.
  3. Create a token or use the Default Token provided in the list.

    3_cesium_token_settings.png

  4. Copy the token to the clipboard

    4_cesium_token_1.png
     

  5. Run the Cesium demo and enter the token as requested.

    You can also add the token to the data/cesium/config.json file and specify the albedo data code (this is useful if you plan to test the plugin in the UnigineEditor as described below).

     

    5_config.png

    access_token

    The token generated by Cesium based on the selected geodata. Insert it between the “” symbols.

    asset_id

    The ID of the Cesium World Terrain data used to visualize the terrain geometry (currently, the plugin works only with this data source)

    raster_overlay_id

    The ID of the imagery source containing the albedo data. You can select any imagery source, but not more than one.

Controls

  • WASD keys to move around

  • QE keys for moving up and down relative to the camera position

  • Mouse movements for turning

 

Interface

UI enables you to control the camera speed and specify geocoordinates to navigate to any location.

6_demo_ui.png

  • Longitude, Latitude, and Altitude, in degrees.
  • Velocity Multiplier - velocity coefficient depending on the height above the Earth ground.
  • Minimum Velocity, in meters per second.

 

Adding the Plugin to your Project

7_editor.png

 

To check the Cesium plugin in UnigineEditor, you’ll need to perform the following steps:

  1. Create a new C++ (Visual Studio 2015+) project.
  2. Manually add the following plugin and additional library files from the <SDK_INSTALL_DIR>/bin folder to the bin folder of your project:
    • Cesium_double_x64.dll (*.so for Linux)
    • Cesium_double_x64d.dll (*.so for Linux)
    • libcurl.dll (*.so for Linux)
    • libcurld.dll (*.so for Linux)
  3. Add the Cesium token to the data/cesium/config.json file as described above.
  4. Load the plugin in one of the following ways:
    • via the console command: plugin_load Cesium
    • or by specifying a key in the Customize UnigineEditor Options in the SDK Browser (ellipsis under the Run Editor button): -extern_plugin Cesium
  5. To have the planet displayed in the Editor viewport:
    • Select main_player as the editor camera (or specify another camera name in the config.json file in advance).
    • Open Camera Settings and set the distance to the Far Clipping Plane to 2000000.
    • Set the camera position to X=4800000, Y=50000, Z=4500000.

 

Limitations:

The plugin is under active development, so the following features are not available at the moment:

  • Detailed insets
  • Other terrain geometry data
  • Interaction of engine objects (water, clouds, atmosphere, meshes) with the planet
  • 3D Tiles data

But we are striving to make all this possible in the future.

 

 

6_demo_ui.png

  • Like 4
  • Thanks 1
Link to comment

Known Issues

  • Press ENTER to confirm the entered coordinate values; otherwise they will be discarded after turning the camera.
  • Crash when flying away from the Earth with a considerable Velocity value.
  • Some visual artifacts may appear when rendering streamed tiles.
  • Crash at an attempt of using the world_reload console command.
  • Crash on closing the application.
  • Clicking ENTER at the token request skips the token input procedure, so nothing is rendered.
  • Engine nodes don’t interact with the planet.
  • The camera’s geospecific options are not available in the Editor.
  • Like 1
Link to comment

Hi, it's great to see some progress on the Planet topic!

A few questions/feedback:

  • how will insets be managed? Will existing Landscape or TerrainGlobal be supported (with which limitations?)
    • It would be nice if existing Landscape could be integrated, even Flat ones! This would be great for reuse and "selling" Planet internally as an extension and not 'yet another terrain model"!
  • Will we have the possibility to cache terrain when internet is not availaeditor_log.txtble? (even encrypted would be nice)
  • Some tiles corruption and flashing was observed. Some albedo levels stayed very dark, while some others stayed very bright
  • While the demo Cesium works fine, I couldn't get it to run in the editor (always crash, no warning or error in the log, see file attached)
  • How do you plan working with  Cesium within the editor?
    • With geocentric coordinates? This might be very hard to work with, as everything would be tilted...
    • With multiple "geodetic reference point", and a single one active at a time to keep some local XYZ? This would be nice I think, and would allow to place multiple insets while keeping them "horizontal" when working with each of them.
    • Your own solution?

Thanks!

Link to comment
  • 5 months later...
On 12/29/2021 at 6:17 PM, binstream said:

We are discussing a number of options internally at the moment - will share details soon.

There is any news about a possible integration with Cesium or any other tools that can create the globe ( I see something in the 2.16 changelog about that but is not clear how you want achieve this feature )? 
I also see that plugin experimental was initially on SIM edition only, any chance that will be opened also to Engineering ( that support 64bits coordinate as well ) or Community?

Regards,
Andrea

Edited by andrea.padovani
Link to comment
×
×
  • Create New...