1. Importing the Looking Glass Unity Package
Set your Looking Glass Display to Desktop Mode and import the HoloPlay Plugin for Unity into a New Project in Unity by either double clicking on the package in your downloads folder or importing the asset within Unity via Assets > Import Package > Custom Package.
That's it! You're ready to get started with your first Unity hologram!
2. Framing content with HoloPlay Capture
Let's open up the first example scene in the package "Framing Content with HoloPlay". This example demo scene should show a little island with two cute furry creatures.
Navigate to the HoloPlay Capture in the Hierarchy and then select toggle preview (or ctrl + e) in the Inspector to view your scene in the capture box in your connected Looking Glass display.
Let's go over a few basics:
The HoloPlay Capture camera is pretty similar to the Unity standard camera, but there are a few things are different.
Namely, it's a box. The pink square in the front center of this box is the point of focus in the Capture Box and thus the connected Looking Glass Display.
If we move the capture box back and forth, you can see wherever the square is becoming the clearest focal point in the scene.
3. Adjusting position, rotation, scale and FOV
Select the DEMO object in the example scene's hierarchy. Let's check out the cool script that, in play mode, allows you to see animations of position, scale rotation, clipping plane, and FOV of the HoloPlay Capture camera. Hit play and go through each selection to see what changing each does for your Looking Glass view.
While this DemoCaptureAnimator script is an example of ways you can animate these values in script, you don't have to do that. In Advanced Camera Settings on the HoloPlay Capture, you can change these settings manually.
4. Adding interactions! (Easily) interact with your Unity Holographic scene
Go to the prefabs folder of the Looking Glass Plugin and add the 3D Cursor prefab to your scene. The 3D Cursor is a great component that allows you to easily maneuver your scene with your mouse cursor in play mode.
Once you've got the 3D Cursor added, go to the HoloPlay Capture and Add Component → Orbit Control to your camera.
Now that you've got the 3D Cursor setup you can try it out in play mode with the following controls!
- left click + drag to rotate the scene,
- scroll up and down to zoom in and out of the scene,
- scroll wheel down and mouse drag to pan the scene around
- double click any point of the model to focus the view at that point
Pull in your own models into the scene and interact with them with the 3D Cursor and Orbit Controls.
5. 3D Screenshot your scene as a quilt
So you made all of these amazing 3D scenes in Unity... but how do you export them onto blocks.glass or Looking Glass Studio? While running your scene in play mode, hit F10. A quilt screenshot should now appear in your project's main folder as a PNG.
Under quilt settings on the HoloPlay Capture prefab, you can customize your 2D and 3D quilt screenshot keys here:
6. Recording your scene with HoloPlay Recorder
Another amazing feature in our Unity plugin is the ability to record quilt videos of your 3D scenes and save them in Looking Glass Studio or share them with others.
In the Looking Glass Plugin Scripts folder, there is a script called HoloPlay Recorder. That script can be called in your Unity Project to record out quilts of specific views and timing you want. First add the HoloPlay Recorder as a component on the HoloPlay Capture box in your scene.
Keep the presets at default. Though the HoloPlay Recorder is now a component on the Capture camera, we still need to create a controller for it in the scene so that you can Play, Pause, Unpause, and Stop the recording how you'd like.
Here's a simple script we made that maps the HoloPlay Recorder functions to keys 1-4. You can create an empty GameObject (we named ours Recorder) and add the script below as a component to it.
Feel free to copy and paste:
Drag the HoloPlay Capture from the Hierarchy into the Recorder field to reference HoloPlay Recorder.
Now you can record a quilt, that will by default save to your general Project folder.
Something to note: as you record quilts, change the Output name field on the HoloPlay Recorder component of the HoloPlay Capture. If you don't change the name or move the saved quilt from the project folder, new recorded quilts with the same name will overwrite each other.
7. Share your Holograms with us!
We're always excited to see what you're making!
If you have any questions, please reach out to us! You can reach the team at Looking Glass Factory at firstname.lastname@example.org!
Share with us your first Block or quilt recording using Unity, either in the Discord, or by tweeting and tagging @lkgglass