Training
Module
Render a 3D model with Azure Remote Rendering - Training
Use Azure Remote Rendering to render a 3D model in a Unity project. You can deploy the model to HoloLens 2 or use the power of mixed reality with the MRTK.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The shell state of the Hierarchical state override component is a transparency effect. In contrast to see-through rendering, only the front-most layer of objects is visible, akin to opaque rendering. Additionally, the objects' normal appearance can be altered when rendered as shells. The effect is intended for use cases where the user should be visually guided away from non-important parts while still maintaining spatial awareness for the whole scene.
You can configure the appearance of shell-rendered objects via the ShellRenderingSettings
global state. All objects that use shell rendering will use the same setting. There are no per object parameters.
Note
The shell rendering effect can't be applied to point clouds.
Class ShellRenderingSettings
holds the settings related to global shell rendering properties:
Parameter | Type | Description |
---|---|---|
Desaturation |
float | The amount of desaturation to apply to the usual final object color, in range 0 (no desaturation) to 1 (full desaturation) |
Opacity |
float | The opacity of the shell-rendered objects, in range 0 (invisible) to 1 (fully opaque) |
See also the following table for examples of the parameters' effects when applied to a whole scene:
0 | 0.25 | 0.5 | 0.75 | 1.0 | |
---|---|---|---|---|---|
Desaturation | |||||
Opacity |
The shell effect is applied on the final opaque color the scene would be rendered with otherwise. That includes the tint hierarchical state override.
The following code shows an example usage of the ShellRenderingSettings
state via the API:
void SetShellSettings(RenderingSession session)
{
ShellRenderingSettings shellRenderingSettings = session.Connection.ShellRenderingSettings;
shellRenderingSettings.Desaturation = 0.5f;
shellRenderingSettings.Opacity = 0.1f;
}
void SetShellSettings(ApiHandle<RenderingSession> session)
{
ApiHandle<ShellRenderingSettings> shellRenderingSettings = session->Connection()->GetShellRenderingSettings();
shellRenderingSettings->SetDesaturation(0.5f);
shellRenderingSettings->SetOpacity(0.1f);
}
The shell rendering feature carries a small constant overhead in comparison with standard opaque rendering. It is significantly faster than using transparent materials on objects or see-through rendering. Performance may degrade more strongly if only portions of the scene are switched to shell rendering. This degradation can occur due to additionally revealed objects requiring rendering. In that regard, performance behaves similarly to the Cut planes feature.
Training
Module
Render a 3D model with Azure Remote Rendering - Training
Use Azure Remote Rendering to render a 3D model in a Unity project. You can deploy the model to HoloLens 2 or use the power of mixed reality with the MRTK.