Scene Metadata And Packages
Native application path: gRPC for live data and edits; PMTiles, GeoParquet and COG through the CDN. Start there for browser gRPC-Web setup, signed private URLs and regeneration after changes. OGC API and GeoServices REST examples below are compatibility workflows.
Honua.Sdk.Scenes provides portable scene discovery and offline scene package
contracts. It deliberately does not render scenes or manage viewer caches.
SDK Responsibilities
- List scenes visible to the current credentials.
- Fetch scene metadata, including capabilities, bounds, attribution, endpoint metadata, auth requirements, and access envelopes.
- Resolve render-ready endpoint URLs for viewers such as Cesium, MapLibre,
deck.gl, native MAUI hosts, or
@honua/embed. - Parse and validate offline scene package manifests.
Viewer Responsibilities
- Cesium, MapLibre, deck.gl, WebGL/WebGPU, Mapsui, and native map controls.
- Browser cache adapters, service workers, IndexedDB, and renderer asset prefetching.
- MAUI/native file placement, package download scheduling, background transfer, and eviction.
- AR/VR anchors, camera controls, display state, and user interaction.
Unreal Integration Spike
The Unreal path is documented in
../.specifica/unreal-integration-path-honua-scenes-dotnet-tooling/README.md.
The current recommendation is:
- keep the first 3D construction demo web/CesiumJS-first;
- use
.NETfor scene manifest discovery, validation, handoff manifests, and offline-package inspection; - use Cesium for Unreal plus native Unreal HTTP/OpenAPI calls for runtime scene loading, selection, UI, input, physics, and packaged-cache behavior;
- avoid embedding .NET into Unreal until a concrete runtime need outweighs the packaging and debugging cost.
Usage
Canonical discovery and opaque protected asset sessions
Use ListSceneCatalogAsync, GetSceneCatalogMetadataAsync, and ResolveSceneCatalogAsync
to consume the canonical versioned discovery contracts. servingFormat and contentKind
(including exact unclassified) are preserved independently, and resolved Endpoints is
the sole runtime selection authority. For protected endpoints, open an opaque,
non-serializable HonuaSceneAssetSession so short-lived access-envelope tokens stay
strictly inside the host-local HTTP pipeline and never enter serializable scene models,
offline packages, diagnostics, or logs:
using Honua.Sdk.Scenes;
using Honua.Sdk.Scenes.Extensions;
builder.Services.AddHonuaScenes(options =>
{
options.BaseAddress = new Uri("https://api.honua.example");
options.BearerTokenProvider = ct => tokenProvider.GetTokenAsync(ct);
});
var scenes = await sceneClient.ListSceneCatalogAsync(new HonuaSceneCatalogListRequest
{
ServingFormat = HonuaSceneServingFormats.ThreeDTiles,
});
var resolution = await sceneClient.ResolveSceneCatalogAsync(scenes[0].Id);
var endpoint = resolution.SelectEndpoint(
HonuaSceneEndpointFormats.ThreeDTiles,
HonuaSceneEndpointFormats.Copc);
if (endpoint is { RequiresAuthentication: true })
{
using var session = await sceneClient.OpenAssetSessionAsync(resolution, endpoint);
using var assetHttp = new HttpClient(session.CreateMessageHandler());
using var rootResponse = await assetHttp.GetAsync(endpoint.Url);
}
Existing IHonuaSceneClient methods (ListScenesAsync, GetSceneAsync, ResolveSceneAsync)
remain supported for backwards compatibility.
Offline Manifests
var manifest = HonuaScenePackageManifest.ParseJson(json);
var validation = manifest.Validate(DateTimeOffset.UtcNow, availableAssetKeys);
if (!validation.IsValid)
{
// Treat validation.Issues as package state, not renderer state.
}
The SDK validates package identity, expiry, extent, LOD, byte budget, asset paths, hashes, and required local assets. Downloading assets, storing files, and wiring offline URLs into a renderer stay in the consuming app or viewer package.