Ambient Occlusion | Web SDK v5 | Mappedin Developer Portal
Loading...

Ambient Occlusion

Ambient occlusion is currently an experimental component of the Mappedin SDK. While in this state, some features may not behave as intended and APIs may be changed. Experimental features are being tested together with early adopters to fine-tune them.

Ambient occlusion is a visual effect in computer graphics that adds subtle shadows and softens lighting, making virtual scenes look more realistic by enhancing depth and spatial relationships between objects. When viewing a map using the Mappedin SDK, ambient occlusion typically shows the most effect at edges of polygons, where a shadow may appear. The effect will vary depending on the map geometry and colours.

Map with ambient occlusion enabled. Ambient Occlusion Cruise Ship - Web SDK V5

Map with ambient occlusion disabled. Ambient Occlusion Disabled - Cruise Ship - Web SDK v5

Ambient occlusion is enabled in the TMapViewOptions object passed into the showVenue method. In the current version of the Mappedin Web SDK, multiBufferRendering must be disabled when using ambient occlusion.

const mapView = await showVenue(document.getElementById("app")!, venue, {
multiBufferRendering: false,
aoEnabled: true,
aoQuality: "Ultra",
aoResolution: "full"
});

The quality and resolution used for ambient occlusion can be configured at various levels. Higher settings will result in better visuals at the expense of graphic hardware utilization.

aoQuality - Greater quality means less noise at the expense of higher graphic hardware utilization. Possible options are Performance, Low, Medium, High and Ultra.

aoResolution - Higher resolution results in less visual artifacting at the expense of higher graphic hardware utilization. Possible options are half and full.

The Codesandbox below demonstrates ambient occlusion.

Was this page helpful?

Next Topic

Outdoor View