-
Notifications
You must be signed in to change notification settings - Fork 26
Getting Started: Project Setup
This page is a step-by-step guide on how to set up a fresh Unity Project that is VRSL 2.0 compatible!
- Regardless of if you are making an AudioLink or DMX-powered scene, it is imperative you start here!
- There will be some information about migrating a project at the bottom as well!
First things first, we'll list the requirements that you need to get started so you can go ahead and download all the software/unity package files that you need!
- Unity 2019.4
- VRChat SDK3 for Worlds
- UdonSharp
- USharp Video Player
- PostProcessing Stack V2 (Unity Package Manager)
- uDesktopDuplication 1.8.0
- AudioLink v2.7+ (Full)
- Recommended: Open Broadcast Software (or streaming software of your choice)
- Recommended: VRSL Grid Node (For DMX control)
- Recommended: At least one extra screen that can support 16:9 resolutions.
It is recommended you install these packages in this order to avoid any possible errors that Unity might throw at you!
Install everything as instructed below, then click Clear
in the console. Only then if there are still errors, retry or ask for help.
-
Open Unity Hub and start a fresh Unity 2019.4 3D project. Save it somewhere secure!
- Ensure that Post Processing Stack V2 is installed in the Unity Package Manager!
- If you are upgrading from VRSL 1.0, make sure to backup your project and then remove any trace of VRSL 1.0 from your project, both in the files and in the scenes.
-
Install the newest version of VRChat SDK3 into your project.
-
Install the newest stable release of UdonSharp.
-
Install the USharp Video Player (You can use other VRChat video players if you wish, you will just have to replace the Usharp Video Player in some of the video player prefabs.)
-
Install the newest stable release of uDestkopDuplication.
-
Install the newest stable release of AudioLink.
-
Finally, install VRSL 2.0!!
You should now have everything you need for your VRSL-compatible project!
However, 2.0 includes the VRSL Control Panel, so we will be using that to be doing most of our scene setup! When you have installed everything correctly, your project should look something like this:
You can check if everything works by looking at some of the example scenes located in Assets/VR-Stage-Lighting/Example Scenes
. The Horizontal Desktop Viewer Example Scene (the first one in the folder) should look something like this:
Once you've confirmed everything is working, you can go ahead and start a new scene or open an existing one!
To Begin, we'll start by opening up the VRSL Control Panel Editor Window. You can find that window located under VRSL>Control Panel on your upper toolbar. Shown Below.
After opening the Control Panel, you should see a window like this:
This is the VRSL Control Panel, we'll be going through some of the more basic functions to get you started in this page of the wiki, if you want more information about what this panel can do, you can go to the official VRSL Control Panel page.
So the first thing to notice is the object field holding the default directional light in the scene. The default directional light in every new unity scene has shadows enabled, and thus has the depth texture enabled for the scene, which is required for most VRSL shaders to work properly. If you removed that light, you'll see this:
So, what do these two buttons do? They spawn the two prefabs required for VRSL to work properly, the depth light prefab (which is just a directional light that doesn't produce any visible light), and the VRSL-LocalUIControlPanel
.
As stated before, the depth light/directional light prefab is required for certain shaders to work properly (such as projection and volumetric shaders) by allowing the camera to render the depth texture.
The VRSL-LocalUIControlPanel
is the central hub where most of your interaction with the lights in the scene will reside. It has 3 purposes: Acts as an interface between the editor script and the fixtures in the scene set up initialization properties for the scene and provides default adjustment sliders for users to use to locally adjust the intensity of VRSL lights to their comfort.
When both buttons are pressed, your scene should look something like this:
Now, we have just one last step for all lights to function correctly. Some light do not have a colored sprite texture that gets turned on with the lights, and just rely on a texture on the fixture objects. This texture doesn't perfectly represent the current color value being fed to the fixture either via DMX or AudioLink, and without the PostProcessing bloom effect the texture will display complete white, or a boolean value of the full r/g/b color if you set one of those 3 channels to 255 on DMX. To fix this, first go into VR-Stage-Lighting/Other/PostProcessingExample/
and drag both example prefabs into your scene, Bloom and ACESToneMapping.
Once you have done this, select your scene's Main Camera and add a Post-process Layer
component. On this component, set the layer to PostProcessing
and leave the other settings as-is.
If you do not have the layer on the dropdown, then create it by going to the top bar and clicking Edit --> Project Settings --> Tags and Layers. In Tags and Layers, just set the next empty layer to PostProcessing
. Exit the window, and the layer should now be accessible in the Layer
dropdown menu.
Then ensure that both placed prefabs are set to the layer as well.
You should be all set now! Your scene is now VRSL Compatible. From here, you must choose how you wish to control your lights, either through DMX or through AudioLink.
-
DMX mode allows you to control your lights using the industry-standard protocol for controlling stage lighting in real life! Along with the VRSL Grid Node, you can control your lights through a live stream via a pixel-reading method, allowing any external program that supports the protocol to control your lights in real time!
-
AudioLink allows you to control your lights from the incoming music of a live stream, allowing it to flash or change colors based on the music coming from a stream or video! Use this method if you intend on controlling the lights from inside the game only as AudioLink provides a good basis for making other in-game controls!
Tutorials for both are on the side under "Getting Started" or you can click them here: