Umbra can import data using:
Optimization can be controlled using the Parameters. Once optimization is complete, the scene may be viewed using the Runtime. Partially optimized scenes may also be viewable but this is not guaranteed.
Importing data using the SDK API is done with the following steps:
- Creating an importer
- Specifying the input scene to the importer
- Specifying scene properties and optimization parameters
- Finishing the import and getting the result identifiers
Sample code for importing can be found in the samples directory in the SDK package.
The first step in using the import API is to create the importer. This can be done UmbraCloudImporterCreate function, which creates an importer that can be used to import to the cloud service.
The importer supports two ways importing data:
- Importing directly from a supported file format
- Introducing the scene manually to the API
If the input is in a supported file format (OBJ, LAS, XYZ, Umbra Repository), the importer can import directly from the file to the cloud. This is done using the UmbraImportFromFile function.
Introducing a scene to the API manually is done through the UmbraInputScene, acquired using UmbraGetInputScene. The UmbraInputScene object supports importing textured meshes and point-cloud geometry, as well as referring to previously imported scenes (using SceneID) as a part of a new import. Please refer to the import sample and C API for further information.
Scene properties specify certain optimization-related properties:
unitsToMeterscontrols the scene unit scaling, affecting scaling of the computation parameters
contentProfilegives a hint to the computation about the type of input data, setting computation parameter defaults to appropriate values for the input data
These properties are set using UmbraSetSceneProperties. By default
unitsToMeters is assumed to be 1 (no scaling), and
contentProfile is unknown.
In addition to the scene properties, individual computation parameters can be set using
More information about the scene properties and computation parameters is available in the Parameters page.
After the previous steps are done, the import process can be finished with UmbraImportFinish. After a successful import, UmbraImportGetSceneId and UmbraImportGetLocator can be used to get the scene identifier and locator. If importer finish returns an error, UmbraImportGetError provides a human-readable error string.
After finishing the import, the importer object must be destroyed using UmbraDestroyImporter.
The command-line application documentation is on page Command Line Interface.