Unity plug-in

❗️

A breaking change if updating from v0.1.9 or v0.2.3.

This package contains a new folder structure for the plugin as well as some variable name changes and video player changes that may break any links you added to the plugin. If you're planning to use this in your existing project that has used an older plugin version, we highly recommend deleting your current plugin, then importing the latest.

Previous applicable versions:

  • v0.1.9
  • v0.2.3

Version 0.2.7

Fixes

  • Solved an issue where different crop values from Depthkit will impact the orientation of the Depthkit clip in Unity.

Known Issues

  • Multi-editing may cause errors or clips may fail to recognize your intended changes when more than one clip is selected. Please be aware of this when trying to edit many clips at once.
  • Disabling/re-enabling a Depthkit clip after playback may cause a material error in the form of a pink box above your clip. Simply click anywhere in the editor to clear this.
  • When your Depthkit clip is hidden (the game object is disabled), the editor claims that your "Depthkit clip is not setup". Don't worry, this will switch back to setup when the clip is re-enabled.

❗️

The Zero Days VR Look is deprecated.

The Zero Days Look

  • iOS is not supported for the Zero Days Renderer.
  • The Zero Days Look does not work on builds for Magic Leap.
  • When importing the Depthkit Unity Plugin and a Looks Package, you must be importing packages with the same version number. If importing Zero Days Look v0.2.5, you need to have already imported Depthkit Unity Plugin v0.2.5 into your project.

Platform

Photo Look

Zero Days Look

PC Standalone

Supported

Supported

Mac Standalone

Supported (see Player Settings for Mac)

Supported (see Player Settings for Mac)

iOS

Supported (see Media Player Settings for iOS)

Not Yet Supported

Android

Supported (see Player Settings for Android)

Supported (see Player Settings for Android)

Player Settings for Mac Standalone

When using the Zero Days Look on a Mac, you will need to adjust your Auto Graphics API to use OpenGLCore. This is under Player Settings -> Other Settings -> Rendering.

  1. Uncheck Auto Graphics API for Mac.
  2. Remove Metal from Graphics APIs for Mac.
791791

Media Player Settings for iOS

If using AVPro as your Depthkit video player, note that you may need to disable YbCbCr420. This is found in the Inspector in the Depthkit Clip Media Player component. Scroll to the bottom of this component, click iOS and disable Use YbCbCr420.

900900

Player Settings for Android

Depthkit Unity Plugin is incompatible with OpenGLES2 on Android. To publish to Android use these player settings under Player Settings -> Other Settings -> Rendering.

795795
  1. OpenGLES3 supported by Android 4.3 (API level 18) and higher
  2. You will also need to go to Edit -> Graphics Emulation -> No Emulation, to use the Zero Days Look properly when creating for Android.

❗️

Galaxy S6 Incompatible with the Zero Days Look

Some phones (Galaxy S6) require OpenGLES2. This means that Unity will not be able to build to the S6 when using the Zero Days Look option or when using the simple renderer with linear color space (linear on Android requires OpenGLES3 or Vulkan to build).

Looks are sets of effects that enable creative flexibility and a range of design styles with your Depthkit clips. In addition to a photorealistic rendering, you can also achieve a custom aesthetic with the help of Depthkit's first Zero Days Look. These Looks are available to use with the Unity Plugin and take the form of renderers; the Photo Renderer and the Zero Days Renderer.

Apply the Zero Days Renderer

453453

Once the Zero Days package has been imported into your Unity project, you are able to select the Look in the Depthkit Clip Editor. If you don't already have the Zero Days Look imported, see here on how to Import the Looks Package.

❗️

Be aware of Plugin Versions

When importing the Depthkit Unity Plugin and a Looks Package, you must be importing packages with the corresponding version number. If importing Zero Days Look v0.1.0, you need to have already imported Depthkit Unity Plugin v0.2.6 into your project.

889889

Once selected, the Clip Editor will add the needed Renderer components. For the Zero Days Renderer, this includes:

  • The Zero Days Look (Script)
  • Fill Layer
  • Line Layer
  • Point Layer
881881

The Zero Days Renderer (Script)

853853

This component allows you to easily build on the Look by applying Line and Point Layers. These layers are added as individual Unity components and can be blended with the Fill Layer and each additional layer you add. By default, one of each layer is applied to your clip once you apply the Zero Days Look (script), however, you can add multiple layers on top of each other. In this component, you can set the following,

  • Self Occlusion: Toggle on and off for self occlusion across all Hologram layers. When self-occlusion is enabled the reverse side of the hologram elements do not blend with the front facing sides. This makes figures easier to discern when seen from the side, while still achieving an ethereal hologram look.
  • Mesh Density: Specify the mesh quality of your clip. When switching between Looks, you will need to set this again.
  • Line Layer: The line layer renders your Depthkit asset as lines instead of a full mesh.
  • Point Layer: The line layer renders your Depthkit asset as a series of points, similar to a point cloud aesthetic.

Line Layer

854854

The rendering of the Line Layer is blended with the rendered layer composition previously rendered and if the Self Occlusion option is selected in the default Zero Days Renderer then the rendering pass will only pass lines that are not occluded by geometry or not on the surface of the reprojected depth.

  • Blend Mode: Just like the Fill Layer, the blend will interact with the Fill Layer (and other layers you have applied) as an alpha, additive, multiply, or screen blending mode.

❗️

Multiply Blend Mode

There is a known issue in which the multiply blend mode does not blend properly. Opacity is also not accurately represented when using multiply.

  • Orientation: allows for the horizontal or vertical orientation of the line effect.

  • Line Count: adjusts the number of lines that make up your clip.

  • Line Density: adjusts the resolution of the lines, increasing or decreasing the quality of the rendered lines. It is recommended to increase this value for best visual results, however this needs to balanced for performance.

  • Opacity: controls the opacity of the individual line layer.

  • Width: adjusts the width of the lines.

  • Line Sprite: allows you to add a custom sprite texture that will be rendered at each vertex along the line.

Point Layer

The point layer renders your Depthkit asset as a series of points, similar to a point cloud aesthetic.

852852
  • Blend Mode: Just like the previous layers, the blend will interact with the Fill Layer (and other layers you have applied) as an alpha, additive, multiply, or screen blending mode.

❗️

Multiply Blend Mode

There is a known issue in which the multiply blend mode does not blend properly. Opacity is also not accurately represented when using multiply.

  • Point Columns and Point Rows: adjust the resolution of the points across the projected depth surface.

  • Opacity: controls the opacity of the individual point layer.

  • Point Size: controls the size of the point layer.

  • Point Aspect: controls the aspect ratio of the point. In other words, if you would like to make the points rectangular, you can modify the aspect ratio independently from the point size.

  • Point Sprite: allows for a texture that is sampled to render each point quad. If not set then the renderer will sample the projected color map.

Switching between Looks

Your effects components will not save between renderers. For example, when you switch a clip from Zero Days to Photo, you will see the warning below. If selecting Yes, this will blow away any work created using the Zero Days Renderer.

388388

Version 0.2.6

Fixes

  • Refined default values of Spike Removal for ease of cleaning up edge artifacts in the editor.
  • Fixed bug in which the Zero Days Line Layer caused a geometry shader warning on OSX.
  • Improved functionality between the Unity Plugin and the corresponding Look version, meaning that if you import the Plugin with an old version of the Look package, you will be warned in the console.

Known Issues

  • When upgrading the Unity Plugin in an existing project, your existing Depthkit clips under the Zero Days Look may generate an extra Depthkit_Photo Look (script) component. This will not break your clip, however, it will cause conflicting mesh density settings. To solve, simply remove the extra Depthkit_Photo Look (script) component as outlined below.
707707
  • Multi-editing may cause errors or clips may fail to recognize your intended changes when more than one clip is selected. Please be aware of this when trying to edit many clips at once.
  • Disabling/re-enabling a Depthkit clip after playback may cause a material error in the form of a pink box above your clip. Simply click anywhere in the editor to clear this.
  • When your Depthkit clip is hidden (the game object is disabled), the editor claims that your "Depthkit clip is not setup". Don't worry, this will switch back to setup when the clip is re-enabled.
  • Zero Days Renderer: iOS is not yet supported for the Zero Days Renderer; the Zero Days Look does not currently work on builds for Magic Leap; Point and Line Layers blend, if blended with 100% black, may not show up in your clip.

Version 0.2.5

Fixes

  • Improved functionality of switching between video players.
  • Fixed playback issues for AVPro Direct Show when the clip would have delayed playback in a build.
  • Fixed bug where the Zero Days Look Fill Layer would not show up in a build if it is the only layer used.
  • Sprite orientation has been corrected for applying sprites in the Zero Days Look.

Known Issues

  • Multi-editing may cause errors or clips may fail to recognize your intended changes when more than one clip is selected. Please be aware of this when trying to edit many clips at once.

  • Disabling/re-enabling a Depthkit clip after playback may cause a material error in the form of a pink box above your clip. Simply click anywhere in the editor to clear this.

  • When your Depthkit clip is hidden (the game object is disabled), the editor claims that your "Depthkit clip is not setup". Don't worry, this will switch back to setup when the clip is re-enabled.

  • Zero Days Renderer: iOS is not yet supported for the Zero Days Renderer; the Zero Days Look does not currently work on builds for Magic Leap; when importing the Depthkit Unity Plugin and a Looks Package, you must be importing packages with the same version number. If importing Zero Days Look v0.2.5, you need to have already imported Depthkit Unity Plugin v0.2.5 into your project.

Version 0.2.4

New in v0.2.4

  • Clean up of the Depthkit editor and video players. When updating your Unity project to v0.2.4, you may need to re-enable the startup and playback settings of your existing Depthkit clips.
  • Support for the Zero Days Renderer.
  • Edge clean up and improved functionality of the point and line components.
  • Improved self occlusion that is now controlled with the Zero Days Renderer instead of through individual layers.
  • Support for MPMP Video Player has been removed.

Known Issues

  • Video Players

    • When converting your clip video player from Unity Player to AVPro, the clip will retain the file path relative to the project folder. This means that an AVPro clip may not appear in a build. Make sure that when using AVPro, your video file source path is set to “Relative to Streaming Assets Folder”.
    • When using AVPro as your video player, the clips doesn't always show up in a build when your Preferred Video API is set to Direct Show in your AVPro global settings. We recommend that you do not use Direct Show. Stick with the default Windows Media Foundation.
    • Unity video player may cause more edge artifacts than AVPro when playing you clips. This is easily solved by adjusting the Clean Up Filter parameters.
  • Working with your Depthkit Clips

    • Multi-editing may cause errors or clips may fail to recognize your intended changes when more than one clip is selected. Please be aware of this when trying to edit many clips at once.
    • Disabling/re-enabling a Depthkit clip after playback may cause a material error in the form of a pink box above your clip. Simply click anywhere in the editor to clear this.
    • When your Depthkit clip is hidden (the game object is disabled), the editor claims that your "Depthkit clip is not setup". Don't worry, this will switch back to setup when the clip is re-enabled.
  • The Zero Days Renderer

    • iOS is not yet supported for the Zero Days Renderer.
    • When applying a sprite image to the Line Layer, the sprite image will appear flipped.
    • The Fill Layer does not show up on Mac if the fill layer is the only layer being used. This only applies to the Unity Player, so you can avoid this by using AVPro or by applying a Point or Line layer.