Using Unity

Although you only need a 3D editor to create a Vyzn presentation, you can use Unity to get access to additional features. With Vyzn there is no need to write code even when using Unity.

In Unity, you will be able to add some additional features:

  • Add the effects created with Particle Systems
  • Create unique Assets from 3D objects using different tools (Move, Rotation, Scale Factor, Textures, Effects)
  • Create the scene by combining separate FBX files
  • Add to scene Sprite Animation, which you can't create in 3D editors.

To start creating Vyzn presentations using Unity:

  • Ensure that Windows 10 SDK 10.0.16 or later is installed
  • Ensure that 2017.1.2f1 is installed (only this version is supported)
  • Install Vyzn plugin (available per request)

To publish your experience use "Create Session" from "Vyzn" menu. This will open a new browser window with your Vyzn session.

Ensure that there is only one root object before publishing.

The main difference between the general *.fbx model preparation for Vyzn is that you don’t create the hierarchy inside the model, but you can create this in Unity from Empty objects and add your *.fbx models inside it.

Disable Bloom

The Disable Bloom mode blocks bloom gestures, thus preventing the user from accidently exiting the app. When the Disable Bloom mode is on, the gesture is disabled. By default, this mode is disabled for FBX-based presentations and enabled for presentations published from Unity.

Gestures and Voice Commands

By default, gestures and voice commands are enabled for FBX-based presentations and disabled for presentations published from Unity. The gestures and commands will be enabled automatically for a presentation published from Unity, if the presentation is in the positioning mode.

Creating an Event

To create an Event, create a new animation, and add events on the timeline:

Select the function to send the Event:

Parameters are the following:

  • Float determines the time for fade in or fade out (in milliseconds).
  • Int may be 1 or 0: 1 turns on the object, 0 turns off the object.
  • Controlling the fade: 1 = fade in for the Float time;, 0 = fade out for the Float time.
  • String is the name of the event.

You can send several events at the same time using the ":" (colon) sign, e.g. "name1:name2:name3:...nameN".

To activate or deactivate the object, use the Animation Event Game Object Activator script that receives the Event.

Other scripts that you can use:

Animation Event Particle Emission Activator is used to receive the Event to turn on/off particle emission.

Animation Event Start Time Setter sets the start time of animated texture during the object activation (needed to sync the animated texture).

Animation Event Fade is used to receive the Fade event.

Animation system

Control of the animation in the scene is done using the Events tool available in the Vyzn plugin for Unity. The Events system is based on one object that sends the Event named “Name 1” and all the objects that are waiting for it [the Event] and are located inside its hierarchy. Those objects [waiting for the Event] can receive it with the same id “Name 1.” All timings inside the project are based on that (e.g., we send the event “break_wall” to the wall object. The wall object receives it and starts playing the animation of breaking itself.

To control the animated object, you must create a Parent–Object, to which the Animator will be added.

Inside each object there can be another object that controls objects inside of themselves and that can capture events from the outside, which allows creating a certain hierarchy for making needed order inside the project.

You can divide the Events to control different actions for Layers inside Animator (in the Layer Settings, set to weight = 1 so that the layers overlap each other in real time, not sequentially).

If you want to send the event, then add the script called AnimationRootProxy to Parent–Object:

If you want to receive the Event, then add it to the Child–Object one of the scripts: FadeObjectInOut.

Naming of Events

It is recommended (but not obligatory) to give the same name to objects, that this Event accepts, for simplification of orientation in large scenes. By standard means of the Unity, you can animate any material properties. Those materials will be shown, without conflicts, simultaneously with the events.

To improve the accuracy of the animations in Unity, it is recommended to remove check "resamples curves" in Unity settings and restarting the application.

Material Properties

For Vyzn projects use the "Unlit Configurable Transparent Shader” from the HoloToolKit.

For animated texture on UV coordinates, use "HoloToolkit/Unlit Configurable Transparent Texture Animation."

In the material settings, make sure to place Render Queue (RQ XXXX) for all objects with intersecting geometry, depending on the distance of the Object Pivot to the Camera. In this case, in materials containing the name Transparent or Glass, the RQ index will be automatically assigned. See additional information about transparency, materials and shaders here.

If the opaque object is planned during the presentation of Fade-in/Fade-out, then it is necessary to place RQ on all objects located behind it, otherwise it will shine through them all.

For each object to which the Fade-in/Fade-out effects will be applied, you must create your own unique material because the effect will be applied to all objects with this material. In all materials, the Color parameter must be active. The fade-in and fade-out effects are achieved by changing the alpha value from 0 to 255, respectively.

Automatic View Switсhing

Use "next-view" attribute to specify ID of the view to switch to after the current one will finish playing. For instance, "next-view=10", where 10 is another view's ID.

Subtitles

Subtitles are only available within presentations published from Unity and within views with a timeline. To add subtitles use "srt=<SRT file URL>" attribute.

Use "srt-font-family" to change font family. The options are "Times New Roman" and "Segoe UI" (default).

Use "srt-font-size" to change font size. The default value is 32.